Fork me on GitHub
#re-frame
<
2018-05-16
>
aleksandr06:05:54

I do animations this way*

aleksandr06:05:36

What I`m doing wrong? Does Re-frame invoke a requestanimationframe when I do dispatch?

aleksandr07:05:16

And yes. It is a min compiled prod build

ingesol07:05:34

It may be an issue with the efficiency of your animations. If not, you might want to check what is being logged to the console. Printing large amounts of data to the console is very expensive.

aleksandr07:05:27

The second version are not

aleksandr07:05:48

I have not any information on the console

ingesol07:05:02

Did you use re-frame-10x? I think you can read the performance info of a lot of things there

ingesol07:05:52

hard to tell from your code snippet, but sometimes a hierarchy of subscriptions could get heavy

aleksandr07:05:53

By the way on the latest Iphones the app works well! But on the more cheap devices (Honor for example) work very slow

aleksandr07:05:16

But on the prod build it is disabled

aleksandr07:05:09

I have a map with about 200 keys. And It extracts from subscriptions

aleksandr07:05:10

And It extracts before the menu animation fires

curlyfry11:05:32

@al.vyguzov Is it possible to use a transition left 1s or similar in your CSS for animating instead? My experience is that those tend to "just work". Sorry for the somewhat vague answer, I'm not entirely sure why you don't get good performance.

troglotit11:05:57

@al.vyguzov do you recompute left and width in raf? Those subs seem too low-level for re-frame

miikka12:05:15

In re-frame-10x's app-db inspector, for some reason the arrow toggles for expanding datastructures do not work anymore. Anyone have any hints?

miikka12:05:19

Nothing happens when I click them.

mikethompson12:05:16

@miikka seem to remember this can happen if you mix dependencies React15 and React16 dependencies.

mikethompson12:05:53

Ie. if your dependancy is [day8.re-frame/re-frame-10x "0.3.3"] but you are using react16

mikethompson12:05:18

(if you use react16 you should be using [day8.re-frame/re-frame-10x "0.3.3-react16"]

mikethompson12:05:22

Something like that

mikethompson13:05:00

Oh yeah, that's right: seemed to fix it for @timok

mikethompson13:05:17

(above when i talk about dependency mismatches, i think I'm remembering what I suggested, rather than the ACTUAL fix)

miikka13:05:12

I should have React 16 everywhere, but I'll try the profile reset

miikka13:05:08

Okay, now the toggles work

aleksandr15:05:22

@troglotit No. As I unferstood Reagent can raf himself

aleksandr15:05:56

@curlyfry Yes! I use it right now

aleksandr15:05:41

Re-frame only change for examople 0 to 50px

👍 4
aleksandr15:05:30

And css does a animation with help of "transition"

aleksandr15:05:14

"transform-duration" sorry

Hukka18:05:53

Is it just me, that I find reg-sub-raw simpler and more clear, than the usual way? I've only used reg-sub, since I gather "that's the way it's supposed to be done", but somehow writing a separate signal function seems like unnecessary extra concepts compared to just having the reagent basics and subscriptions.

mikethompson21:05:26

@tomi.hukkalainen_slac when you use reg-sub, the computation function is pure. Better for testing, understanding, etc.

mikethompson21:05:16

reg-sub-raw is also easier to stuff up. Requires a deeper level of knowledge.