Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix #425
The reactivity seems to break inside the
RangedFor
component.With this change each item is passed as a function instead of as a value to the render function, which seems to fix the problem, without having to change the api of the library. I sadly don't know enough about solid to find out why passing it as a value is not working.
To fix the reactivity when using
createStore
instead ofcreateSignal
, like in the following example:The
untrack()
call inside theRangedFor
had to be removed. I think that this change can cause some unnecessary rerenders, but i could not notice any worse performance even when rendering lists with 100k+ elements.Not sure if this pull request is going to be helpful, since i could not find out the reasons why these changes have to be made, or if there are better alternatives, but i think this could be a good enough solution to the problem until somebody with more experience in solid can fix this.