Rubick
Rubick
SSolidJS
Created by Rubick on 11/29/2024 in #support
Is there a way to trigger a store change manually even it's still the same object?
Thanks, I think I can just set a Signal<TypedArray> in store like this:
const [store, setStore] = createStore<{ buffer: Signal<Float32Array> }>({
buffer: createSignal(new Float32Array(10), { equals: false })
})

createEffect(() => {
console.log('store buffer change', store.buffer[0]())
})

store.buffer[1](v => {
v[0] = v[0] + 1
return v
})
const [store, setStore] = createStore<{ buffer: Signal<Float32Array> }>({
buffer: createSignal(new Float32Array(10), { equals: false })
})

createEffect(() => {
console.log('store buffer change', store.buffer[0]())
})

store.buffer[1](v => {
v[0] = v[0] + 1
return v
})
8 replies
SSolidJS
Created by Rubick on 5/6/2024 in #support
Using babel-preset-solid in browser
I also digged into packed babel.js file but not realized that the empty object is the fallback of this missing package, thanks a lot for your time!
9 replies