subframe7536
subframe7536
Explore posts from servers
SSolidJS
Created by flippyflops on 8/12/2024 in #support
Help with creating a builder pattern for main renderer
4 replies
SSolidJS
Created by mrVinicius on 6/22/2024 in #support
solidjs pnpm workspace
add src in pnpm-workspace.yml?
3 replies
SSolidJS
Created by lorefnon on 12/28/2023 in #support
Subscribe to patches for a store ?
use createEffect(on(() => store.data.toBeWatched, listener)) or https://primitives.solidjs.community/package/deep#trackstore
3 replies
SSolidJS
Created by phungleson on 9/11/2023 in #support
Vitest 0.34.4 caused `You appear to have multiple instances of Solid`
solved by locking vitest to 0.34.2
13 replies
SSolidJS
Created by febri on 10/21/2023 in #support
How do i create library?
3 replies
SSolidJS
Created by binajmen on 10/3/2023 in #support
How to choose between Store and Context?
in my understanding, context should be used for a scoped state, and can assert a owner to cleanup computations. if there just a global createStore without computations, they are the same
4 replies
SSolidJS
Created by phungleson on 9/11/2023 in #support
Vitest 0.34.4 caused `You appear to have multiple instances of Solid`
same here! have you solve it?
13 replies
SSolidJS
Created by subframe7536 on 9/1/2023 in #support
Recommended way to track the setter of a signal?
Thanks for your suggestion! I will look into it
4 replies
SSolidJS
Created by subframe7536 on 4/30/2023 in #support
how to`createStore` and using `createEffect` to persist without warning
well, I finally struggly solve it my self. According to https://github.com/solidjs-community/solid-primitives/blob/main/packages/context/src/index.ts, wrap onMount with a function and call it in createComponent, and all works without warn
2 replies
SSolidJS
Created by subframe7536 on 4/25/2023 in #support
TypeError when using `createResource` in vitest
btw, I wrap the test code with createRoot, as the warning say computations created outside a createRoot or render will never be disposed
14 replies
SSolidJS
Created by subframe7536 on 4/25/2023 in #support
TypeError when using `createResource` in vitest
thanks! it works!
14 replies
SSolidJS
Created by subframe7536 on 4/25/2023 in #support
TypeError when using `createResource` in vitest
TypeError: Cannot read properties of undefined (reading 'id')
❯ Module.createResource node_modules/.pnpm/[email protected]/node_modules/solid-js/dist/server.js:438:35
❯ test/index.test.ts:39:40
38| const fetchUser = async (id: number) => id + 1
39| const [foo, { mutate, refetch }] = createResource(num, fetchUser)
40| console.log(foo.loading)
| ^
41| })
42| })
TypeError: Cannot read properties of undefined (reading 'id')
❯ Module.createResource node_modules/.pnpm/[email protected]/node_modules/solid-js/dist/server.js:438:35
❯ test/index.test.ts:39:40
38| const fetchUser = async (id: number) => id + 1
39| const [foo, { mutate, refetch }] = createResource(num, fetchUser)
40| console.log(foo.loading)
| ^
41| })
42| })
14 replies
SSolidJS
Created by subframe7536 on 4/25/2023 in #support
TypeError when using `createResource` in vitest
full error log is here
14 replies
SSolidJS
Created by subframe7536 on 4/25/2023 in #support
TypeError when using `createResource` in vitest
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
environment: 'happy-dom',
},
})
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
environment: 'happy-dom',
},
})
14 replies