Random Mesh
Random Mesh
SSolidJS
Created by McBrincie212 on 4/15/2025 in #support
State Doesn't Get Defaulted And Values Don't Change
Gotta go... been cool catching up.
46 replies
SSolidJS
Created by McBrincie212 on 4/15/2025 in #support
State Doesn't Get Defaulted And Values Don't Change
Thats why I have that ReactiveCache utility.
46 replies
SSolidJS
Created by McBrincie212 on 4/15/2025 in #support
State Doesn't Get Defaulted And Values Don't Change
U could use a createMemo there, but the reactive lifespan of the memo will only last the lifespan of the reactive scope it was called with.
46 replies
SSolidJS
Created by McBrincie212 on 4/15/2025 in #support
State Doesn't Get Defaulted And Values Don't Change
But... not optimimal, because the func will execute always even if read again with no change.
46 replies
SSolidJS
Created by McBrincie212 on 4/15/2025 in #support
State Doesn't Get Defaulted And Values Don't Change
It will
46 replies
SSolidJS
Created by McBrincie212 on 4/15/2025 in #support
State Doesn't Get Defaulted And Values Don't Change
return func === undefined ? () => value.store[value.field] ? () => func(value.store[value.field]);
return func === undefined ? () => value.store[value.field] ? () => func(value.store[value.field]);
Maybe (inside else-if branch)
46 replies
SSolidJS
Created by McBrincie212 on 4/15/2025 in #support
State Doesn't Get Defaulted And Values Don't Change
func is a utility to map the value on the way out?
46 replies
SSolidJS
Created by McBrincie212 on 4/15/2025 in #support
State Doesn't Get Defaulted And Values Don't Change
There might be a cleaner way to implement getterFromReactive without requiring createRenderEffect
46 replies
SSolidJS
Created by McBrincie212 on 4/15/2025 in #support
State Doesn't Get Defaulted And Values Don't Change
Its like a store of a lambda, but then it is set by a potentially non-lambda in createRenderEffect.
46 replies
SSolidJS
Created by McBrincie212 on 4/15/2025 in #support
State Doesn't Get Defaulted And Values Don't Change
What is the intended type signature of the inner createSignal ?
46 replies
SSolidJS
Created by McBrincie212 on 4/15/2025 in #support
State Doesn't Get Defaulted And Values Don't Change
46 replies
SSolidJS
Created by McBrincie212 on 4/15/2025 in #support
State Doesn't Get Defaulted And Values Don't Change
Is getterFromReactive something like this?
getterFromReactive<A extends object, K extends keyof A>(params: { store: Store<A>, field: K, }): Accessor<A[K]> {
return () => params.store[params.field];
}
getterFromReactive<A extends object, K extends keyof A>(params: { store: Store<A>, field: K, }): Accessor<A[K]> {
return () => params.store[params.field];
}
46 replies
SSolidJS
Created by McBrincie212 on 4/15/2025 in #support
State Doesn't Get Defaulted And Values Don't Change
.getStyleField('...') must be reading/unboxing the memo early (out side of the first // DOESN'T WORK effect). You'll have to share your getterFromReactive code for closer inspection.
46 replies
SSolidJS
Created by クインシー (小獅) 💜 on 1/11/2025 in #support
How to change base directory
If it's a vite project, you can go base: "" in your vite.config.ts, then everything will be relative path. If your trying to fetch in a web worker, you may have to use postMessage to pass path information from the main UI thread. Because no window object in worker thread.
9 replies