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
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@thetarnav I meant a property from the reactive object. E.g.
const [resource] = createResource(searchParams.property, fetcher)
It has to be a function. So,
() => params.property
@._rb Thanks