Fork me on GitHub
Adam Helins13:10:48

Regarding passing the props map, are dom generators optimizing for this on their own or only within defsc ?

Adam Helins13:10:06

Corollary question, is there any other reason for using defsc when defining a stateless component (having only its rendering function) besides prop checking (`shouldComponentUpdate`) ?


dom generators attempt to use macros to turn exactly into what JSX would emit. Exactly. Same performance and everything even when you use :.x classes and clj props maps (not #js). So, in short: they do exactly what JSX does. defsc without a query: The component options map is nice for cases where you want extra stuff to be carried with the class, but otherwise no, the S.C.U lifecycle is the main thing you’re getting there.

👍 3

Any recommendations on getting rid of this warning?

WARN [com.fulcrologic.fulcro.ui-state-machines:215] - Attempt to get an ASM path [:com.fulcrologic.fulcro.ui-state-machines/local-storage :path-segment] for a state machine that is not in Fulcro state. ASM ID:  :app.ui.core/Router
#error {:message "", :data {}}

Jakub Holý (HolyJak)20:10:05

I am late to the party but I have documented this a while back in the 3rd paragraph of


Use app/set-root! to initialized your app before mounting (and don’t initialize state on mount), then call dr/initialize! , then mount the app. It’s just a render frame that is showing the app before you’ve started the routing state machines


it’s usually harmless, though

👍 3