DanteOz
DanteOz
SSolidJS
Created by DanteOz on 1/29/2023 in #support
Subscribe to
Given the derive signal feedback
const [store, setStore] = createStore({fb: [0,1,2]});
const feedback = store.fb;
const [store, setStore] = createStore({fb: [0,1,2]});
const feedback = store.fb;
is there a way obtain which index in the array was modified when the feedback is trigger.
50 replies
SSolidJS
Created by DanteOz on 1/12/2023 in #support
Server rendering error on createResource. Inconsistent HMR.
I am currently get this error when calling npm run dev and npm run build just hangs.
GET http://localhost:3000/
An unhandled error occured: TypeError: Cannot read properties of undefined (reading 'id')
at Proxy.createResource (/Users/rexor/projects/fastsearch/solid/node_modules/solid-js/dist/server.cjs:412:35)
at /Users/rexor/projects/fastsearch/solid/src/components/Results.tsx:31:25
at async instantiateModule (file:///Users/rexor/projects/fastsearch/solid/node_modules/vite/dist/node/chunks/dep-5605cfa4.js:53364:9)
GET http://localhost:3000/
An unhandled error occured: TypeError: Cannot read properties of undefined (reading 'id')
at Proxy.createResource (/Users/rexor/projects/fastsearch/solid/node_modules/solid-js/dist/server.cjs:412:35)
at /Users/rexor/projects/fastsearch/solid/src/components/Results.tsx:31:25
at async instantiateModule (file:///Users/rexor/projects/fastsearch/solid/node_modules/vite/dist/node/chunks/dep-5605cfa4.js:53364:9)
The error refers to this file https://gist.github.com/DanteOz/ad4570b168da5fc5f8707bcd6069bba1, which imports a signal from this file https://gist.github.com/DanteOz/dfc2eb10e574af82c950aa5ad8d6c516. The page renders in HMR by replacing line 31 with export const results = () => []. If I then replace the original line the page is able to render and the reactivity with my Search component works, but results in a flicker. However, if I restart the dev server it once again breaks. I am using Solid Start with SSR set to false in vite.config.ts.
3 replies