memo with dynamic props pass
am I doing something heavily retarded?
I find myself doing this pattern a lot to enforce that props item is subscribed to
Or should I do something entirely else?
It just seems "Funny"
I mean I could also use
4 Replies
can't you just do
?
it does work in this case, but in such other example
It fails, it does not recognize change within that memo
Why not just use a Show? I think it might also be that you aren't reading
local.cross
inside the memo but inside the function that the memo returns. Though that shouldn't be an issue 🤔 Probably the way you're using Dynamicfair.
I had one more case,
but after thinking about it, i can decouple it into one
createEffect(() => sideeffect(props.name));
and one direct prop pass to <Dynamic component={IconRegistry[props.name]}/>
Okay i think i get it, thanks
unless I have to do the sideefect First and then return the item from the Registry, but I think thats a real valid on()