disable untrack when param changes
is it possible to, again, track an untracked signal when
useParams
parameters changes.
I have a component that retrieves some data from the store based on a URL parameter.
2 Replies
I think what you need is ephemeral state, check this out: https://primitives.solidjs.community/package/memo/#createwritablememo
Basically in your editor create a writabl memo like
createWritableMemo(() => props.data)
and remove the untrack from
then update the writable memo in your editor untill the thing is saved, once the thing is saved update your params
secondly, using createEffect
to set a signal is not best practice, you should create a derived signal if possibleYou are manually rebuilding a reduced version of
createResource
to handle your async state.