subframe7536
Explore posts from servershow to better understand `createDeferred`?
The doc says
idle
, what is the difference between requestIdleCallback
and this? Should it be considerred as reactive version of requestIdleCallback
?
Moreover, after searching across gh and discord channels, there is few examples to show how to use createDeferred
correctly. Is there any best-practice or learning resource about it?2 replies
Recommended way to track the setter of a signal?
Currently, my solution involves wrapping the setter with a function. Playground: https://playground.solidjs.com/anonymous/cae5fd4e-3505-42f3-84a2-af62cc5b2d91
I am aware of
createEffect(on(...))
, but it may be excessive to create multiple effects solely for target signals.
With that in mind, what would be the recommended method in this case?4 replies
how to`createStore` and using `createEffect` to persist without warning
I want to create a function to persist the store to the localstorage, everything works, but it warns that
computations created outside a
createRoot or
render will never be disposed
. I have tried to move createEffect
outside onMounted
, but it even warn twice. Additionally, moving onMounted
inside provider
makes persist break. No help using ChatGPT🥲. Does anyone know how to solve it?
here is my code
2 replies