Can we use solid's For and Index component for data that isn't stored as a signal?
Let's say we're using something like react-query or urql to fetch some data from the server and render it. We're not making a raw fetch request and storing the results in solid's signals. Instead the results are controlled by an external library. Would we get the benefits of solid's
For
and Index
components with this approach?3 Replies
It would not be reactive in case of subsequent refreshes of data. You can easily dump that result into a store using
reconcile
and get signalsis it good to create two copies of the same data?
it is better to avoid duplicating (memoizing) data if it's a large object. If you absolutely must give control to another part of the application that does imperative-style updates to that object, you can use
createMutable