Fork me on GitHub
#fulcro
<
2017-10-11
>
tony.kay00:10:02

@roklenarcic Ah, yes, that’s the other place.Rendering a component with nil props. The mount code tries to add it to the index.

tony.kay00:10:38

and the indexer complains if ident comes back fishy

tony.kay00:10:39

right, on the form stuff. Basically you’ll want to init the form (entity), then put the ident pointing to it in the right place in app state

tony.kay00:10:00

Assuming you don’t have recursive entities that need to be initialized, build-form will work for you.

tony.kay00:10:03

Something like (swap! state update-in [:entity-table id] #(build-form FormClass %))

tony.kay00:10:00

init-form is the more general purpose one, for within mutations

tony.kay00:10:26

(swap! state init-form FormClass [:entity-table id])

tony.kay00:10:06

of course, composition with (swap! state (fn [s] (-> s (init-form FormClass [:entity-table id]) (assoc-in [:person-editor :singleton :person] [:entity-table id]))))

Alister Lee08:10:03

@tony.kay thanks for the suggestion. What am I giving away with that? How do we keep the URL -> SSR -> SEO chain if I want Google to index GET /posts/32 etc.?

roklenarcic10:10:42

Tony the issue is that ModalRouter calls render of whatever modal is the default route despite it not being shown, so I've ended up adding a dummy component to the router to prevent renders being called on a modal when the app loads.

alpox10:10:26

@tony.kay Thanks for the extended answer 🙂 I’m certainly aware that things change much in the web sphere which is something that i partly like but also fear. You made your point though 🙂 I would say its good enough for me if fulcro is as stable as you say, ongoing use of it when there are no or almost no bugs is something I wouldn’t mind. As for maintenance, i guess if i would feel the need and i’d have success with what i do, paying you would probably be an option 😉 Thanks a lot for your effort on fulcro anyway, it looks like a great piece! I did not yet test it so thoroughly but i sure will.

tony.kay14:10:45

@clojure388 Nothing. Just make sure you’re server is set for SSR (as in template) without requiring login for that route

tony.kay14:10:43

@alpox Have fun! I think you’ll like it.

roklenarcic22:10:34

The interesting thing about forms is that entity is modified as I type in input box, with initial state being held under a special key. Not sure why that design and not the other way around (editing forms modifying state hidden under a special key).