Fork me on GitHub
#fulcro
<
2020-01-02
>
hadils00:01:16

Hi @tony.kay. The situation I have is that I am trying to initialize local state transitively. I have a root node with children A, B, C and each them has a child associated with it. I am using only initial state and the children of A, B, C are initialized with data from their local state which is initialized in the Root node. Can this be causing a problem?

hadils21:01:15

I don't know why this code doesn't work https://gist.github.com/a23881b6fefebaa1db4dd70ac5a28d70. The FundRaisingItems class renders fine, but when you press the button, it does not execute the FundRaisiningItemDetail class. I cannot figure this out and I've searched everywhere. If someone can give me a pointer, I would greatly appreciate it!

tony.kay21:01:14

Um…you’re trying to render something inside of an event handler? That makes no sense @hadilsabbagh18

tony.kay21:01:37

You want the rendering to be inline, with state that shows/hides it

tony.kay21:01:13

onClick (fn [_] (m/toggle! this :ui/show-detail?))

tony.kay21:01:40

then use the prop (needs to be in the query) with a when or CSS classes on a div to show/hide the detail.

tony.kay21:01:54

event handlers are event handlers…they have nothing to do with rendering ever

hadils21:01:27

@tony.kay thank you very much!