SolidJSS
SolidJS13mo ago
26 replies
quinnvaughn

Any way to redo this logic without an infinite loop?

I have a page where I'm getting data from a createAsync and then dynamically rendering this in a <Show/>, however, to get the data to get guaranteed instead of possibly undefined I have to use the render prop, which goes into an issue shown here: https://github.com/solidjs/solid/issues/1149. Essentially I cannot use a <For/> loop inside this, as I get an infinite loop - I have to use an <Index/> loop. Is there some other way to do this pattern or am I basically stuck using <Index/>? To be clear, the issue seems to be in the same component. If I have a child component that uses a <For/> it doesn't seem to cause an infinite loop. Is the only solution other than exclusively using an Index making a page component that is independent of the route?
Screenshot_2025-01-17_at_5.27.53_PM.png
GitHub
A declarative, efficient, and flexible JavaScript library for building user interfaces. - Issues · solidjs/solid
Issues · solidjs/solid
Was this page helpful?