Fork me on GitHub
#fulcro
<
2018-03-21
>
bbss07:03:42

I've tried to use a ref function and set it on the state, which stops the constant re-rendering. But now it takes a new canvas element on each props update, that makes the "video feed" flash between frames. :componentDidUpdate does not get called so I can't use ref with a 'simple-ref-id'.

bbss15:03:02

I figured out this is to do with the component not having an ident. Got a well performing version now 🙂

kgxsz09:03:46

Hi, loving Fulcro so far, but having difficulty with loading data from my server. Specifically, I want to do this: 1) on the frontend, transact on a button click, which calls a mutation, which creates a tempid and forwards the mutation to remote 2) on the backend create some “thing” in my db, and return a mapping for the tempid 3) on the frontend, use that newly returned tempid to load this newly created “thing” I’m having issues with: - where exactly should I do this load? It feels wrong doing some kind of componentDidUpdate and checking whether the tempid is one I can use for a new load - the “thing” I want to load isn’t really an entity, I won’t be displaying it, so can I do a load with a simple query rather than needing to defsc something to have a query to give to the load fn. Is there a section in the doc that covers this case?

tony.kay16:03:56

Important to note that tempids should be generated from the UI and sent to mutations as parameters, since mutations get multiple passes.

tony.kay16:03:28

React 16 works fine. There is a warning about SSR, which they’re changing, but it still works until 17 the way it is.

a.espolov12:03:15

Guys, fulcro is support React 16 and shadow-cljs?

thheller12:03:07

don't know about react v16 but shadow-cljs yes. it is even the default for the fulcro template.

mitchelkuijpers12:03:37

Yes Fulcro supports react 16

cjmurphy15:03:38

@kgxsz Yes it is mentioned in the book. Search for 'It is perfectly legal'. You should load from events, for example button presses.