crowned
I can't seem to get ref bindings correctly
I'm trying to implement spatial-navigation in my app so I want to convert this package from Reactjs to Solidjs:
https://github.com/NoriginMedia/Norigin-Spatial-Navigation/
(There are only 6 files to convert and 1/2 of them are vanilla JS code)
My current issue is that I can't seem to get the ref bindings correctly. Here is a hook exported from the app:
And here is one of my Solidjs ref implementations:
Continuation ⬇️
13 replies
How to allow updating of elements instead of destroying and rendering the elements?
I have an array of 100 objects and an div is rendered for each object. Whenever the array changes, a new set of 100 divs are rendered for the new objects. How do I make it such that there are always 100 divs and whenever the array changes, the contents of these divs are changed instead of the divs being re-rendered (destroyed and created).
I'm doing this to improve performance and user experience
61 replies