Can you use the reactive object from useSearchParams as a source signal for createResource?

I've used the property of the reactive object returned from useSearchParams as a source signal for createResource, however, it's currently not working. It does not trigger the fetcher function. However, the property of the searchParams object is updated and I see this reflected in the UI.
4 Replies
thetarnav
thetarnav2y ago
a "reactive object" pertty much means that you have to access a property to subscribe to it so { ...params } will access all top-level properties
JonathanExcelsior
@thetarnav I meant a property from the reactive object. E.g. const [resource] = createResource(searchParams.property, fetcher)
REEEEE
REEEEE2y ago
It has to be a function. So, () => params.property
JonathanExcelsior
@._rb Thanks
Want results from more Discord servers?
Add your server