How to use length for 'For'?
Sometimes I want to just use loop's length, instead of each like js's for loop.
Should I always provide array to use For?
Can I do something like this picture?

4 Replies
Hmm well, that's what i'm doing already. I hope <For> allows just length...it will be very useful..
I don't think so, the users can extract an
range(i)
function to return an array, i think the syntax rules of solid should keep as little as possible.There is a range primitive: https://github.com/solidjs-community/solid-primitives/tree/main/packages/range#readme
GitHub
solid-primitives/packages/range at main · solidjs-community/solid-p...
A library of high-quality primitives that extend SolidJS reactivity. - solid-primitives/packages/range at main · solidjs-community/solid-primitives