nzdeep
createResource refetch causes full page refresh
Once you've sorted out the Suspense boundary you can also wrap refetchProject in startTransition is you wanted to avoid the fallback and use a more softer inline clue for reloading via isPending - useTransition will hand you both isPending accessor and start Transition
9 replies
how to add debounce to any signal setter ?
pretty easy with debounce lib (https://github.com/solidjs-community/solid-primitives/tree/main/packages/scheduled#debounce)
const [signal, rawSetSignal] = createSignal(1);
const setSignal = debounce(rawSetSignal, 250);
// use setSignal
11 replies
Trying to test a component containing a createResource
This is basically as expected, you need to grok the idea that components only run once to setup all the reactivity tracking, and the unlike react suspense doesn't work by throwing promises, and chaining on them and re-running. So you need to guard around resource() being undefined. before access properties of the eventual value
8 replies
Trying to test a component containing a createResource
On the first pass (actually the only pass) resource be will Pending state initially in this case, it won't have executed the fetcher yet even if it is Promise.resolve for the data fetcher - https://playground.solidjs.com/anonymous/7c5e999e-36f5-444f-a1ea-5ab7c6311511
8 replies