REEEEE
REEEEE
SSolidJS
Created by Josesito on 1/18/2025 in #support
How does `query` cache actually work?
query is meant to deduplicate requests in a short time frame (I think it's 5 or 10 seconds) and not meant as a traditional cache. This confusion is part of why it was renamed from cache to query
16 replies
SSolidJS
Created by quinnvaughn on 1/18/2025 in #support
Any way to redo this logic without an infinite loop?
same thing with errors
14 replies
SSolidJS
Created by quinnvaughn on 1/18/2025 in #support
Any way to redo this logic without an infinite loop?
use data('propertyName') instead of data().propertyName
14 replies
SSolidJS
Created by quinnvaughn on 1/18/2025 in #support
Any way to redo this logic without an infinite loop?
I had this issue in a project
14 replies
SSolidJS
Created by quinnvaughn on 1/18/2025 in #support
Any way to redo this logic without an infinite loop?
Oh it's definitely a felte thing
14 replies
SSolidJS
Created by quinnvaughn on 1/18/2025 in #support
Any way to redo this logic without an infinite loop?
It should work fine I think. Do you have code example of what your code looks like now? I can't tell what the issue is from the description
14 replies
SSolidJS
Created by quinnvaughn on 1/17/2025 in #support
Why is this code not reactive?
You can't read it there otherwise it won't be reactive because the component body isn't reactive. If it were, it would cause the whole component to rerender
7 replies
SSolidJS
Created by quinnvaughn on 1/17/2025 in #support
Why is this code not reactive?
No I meant the property itself needs to be a function
const contextValue = {
validationState: () => props.validationState
}
const contextValue = {
validationState: () => props.validationState
}
7 replies
SSolidJS
Created by quinnvaughn on 1/17/2025 in #support
Why is this code not reactive?
It's equivalent to prop destructuring
7 replies
SSolidJS
Created by quinnvaughn on 1/17/2025 in #support
Why is this code not reactive?
contextValue is reading the the value of validationState in the component body (which is not reactive). You'll need to make the validationState prop of contextValue to be a function
7 replies
SSolidJS
Created by Eve on 12/30/2024 in #support
How to type the context from the docs example
Change the file extension from ts to tsx
4 replies
SSolidJS
Created by jack on 12/24/2024 in #support
invoke navigate() after function call but before signal update propagates to ui
45 replies
SSolidJS
Created by jack on 12/24/2024 in #support
invoke navigate() after function call but before signal update propagates to ui
Oops sorry it's useBeforeLeave*
45 replies
SSolidJS
Created by jack on 12/24/2024 in #support
invoke navigate() after function call but before signal update propagates to ui
Maybe you can make use of onBeforeLeave?
45 replies
SSolidJS
Created by jack on 12/24/2024 in #support
invoke navigate() after function call but before signal update propagates to ui
It resolves very fast but you could just use the .then part of it to navigate after it's done just in case
45 replies
SSolidJS
Created by jack on 12/24/2024 in #support
invoke navigate() after function call but before signal update propagates to ui
Is joinGroup a promise?
45 replies
SSolidJS
Created by Peter on 11/23/2024 in #support
How to keep an active item for a list of items in SolidJS?
set the activeItem to a copy of the item not the item directly.
setStore('activeItem', {...store.items[0]});
setStore('activeItem', {...store.items[1]});
setStore('activeItem', {...store.items[0]});
setStore('activeItem', {...store.items[1]});
Depending on how nested it is you might have to make a deep copy
10 replies
SSolidJS
Created by ⯁ 𝓥𝓪𝓵𝓮𝓻𝓲𝓮 on 11/10/2024 in #support
how to manage global signals interacting with other global signals properly?
yup
17 replies
SSolidJS
Created by ⯁ 𝓥𝓪𝓵𝓮𝓻𝓲𝓮 on 11/10/2024 in #support
how to manage global signals interacting with other global signals properly?
so something like
const [signal, setSignal] = createRoot((dispose) => {
const [mySignal, setMySignal] = createSignal(0)

createEffect(() => ...do something)

return [mySignal, setMySignal]
})
const [signal, setSignal] = createRoot((dispose) => {
const [mySignal, setMySignal] = createSignal(0)

createEffect(() => ...do something)

return [mySignal, setMySignal]
})
17 replies
SSolidJS
Created by ⯁ 𝓥𝓪𝓵𝓮𝓻𝓲𝓮 on 11/10/2024 in #support
how to manage global signals interacting with other global signals properly?
You could also wrap the whole state as well and return the signals from the root
17 replies