Answer Overflow Logo
Change Theme
Search Answer Overflow
GitHub
Add Your Server
Login
Home
Popular
Topics
Gaming
Programming
brenelz
Posts
Comments
S
SolidJS
•
Created by hannus on 11/8/2024 in
#support
can I handle a group of useSubmisson?
I think that's correct
8 replies
S
SolidJS
•
Created by hannus on 11/8/2024 in
#support
can I handle a group of useSubmisson?
There is a plural version called useSubmissions
8 replies
S
SolidJS
•
Created by russellchoudhury on 10/20/2024 in
#support
Can I nest cache functions
I think it works unless you like redirect or something
7 replies
S
SolidJS
•
Created by russellchoudhury on 10/20/2024 in
#support
Can I nest cache functions
cache wrapper mainly only used with createAsync or preload
7 replies
S
SolidJS
•
Created by russellchoudhury on 10/20/2024 in
#support
Can I nest cache functions
Just use getAuth as a normal function without cache wrapper
7 replies
S
SolidJS
•
Created by russellchoudhury on 10/20/2024 in
#support
Can I nest cache functions
I don't think nested cache functions work well. You can refactor it out
7 replies
S
SolidJS
•
Created by Mapo Doofus on 10/7/2024 in
#support
Auth in layout?
I think doing in layout components is fine
10 replies
S
SolidJS
•
Created by anthy on 9/6/2024 in
#support
How to use preloaded data
It can be a bit confusing as it's really just dedupes on the same request not a long lived cache
23 replies
S
SolidJS
•
Created by anthy on 9/6/2024 in
#support
How to use preloaded data
Well usually you wrap the function you call in createAsync with cache. So you can preload and call in the component
23 replies
S
SolidJS
•
Created by anthy on 9/6/2024 in
#support
How to use preloaded data
Yup. Something like:
function User() {
const data = createAsync(() => loadUser());
return <div>{data()}</div>;
}
function User() {
const data = createAsync(() => loadUser());
return <div>{data()}</div>;
}
23 replies
S
SolidJS
•
Created by anthy on 9/6/2024 in
#support
How to use preloaded data
Preload basically just warms the cache for createAsync
23 replies
S
SolidJS
•
Created by anthy on 9/6/2024 in
#support
How to use preloaded data
https://docs.solidjs.com/solid-router/reference/data-apis/create-async
23 replies
S
SolidJS
•
Created by anthy on 9/6/2024 in
#support
How to use preloaded data
Use createAsync to call the function
23 replies
S
SolidJS
•
Created by alrightsure on 9/5/2024 in
#support
Top level "use server" doesn't seem to work
Oh this is a good explanation. I just always use it inline instead of top level
6 replies
S
SolidJS
•
Created by Angelelz on 9/3/2024 in
#support
Solid way to Show components based on information from the session or cookies or server only data?
https://docs.solidjs.com/reference/basic-reactivity/create-resource#v140
18 replies
S
SolidJS
•
Created by Angelelz on 9/3/2024 in
#support
Solid way to Show components based on information from the session or cookies or server only data?
You could use deferStream maybe?
18 replies
S
SolidJS
•
Created by Angelelz on 9/3/2024 in
#support
Solid way to Show components based on information from the session or cookies or server only data?
createAsync is a newer primitive
18 replies
S
SolidJS
•
Created by Angelelz on 9/3/2024 in
#support
Solid way to Show components based on information from the session or cookies or server only data?
I think the idea is you could build createResource from createAsync
18 replies
S
SolidJS
•
Created by Angelelz on 9/3/2024 in
#support
Solid way to Show components based on information from the session or cookies or server only data?
https://docs.solidjs.com/solid-start/building-your-application/data-loading#data-loading-always-on-the-server
18 replies
S
SolidJS
•
Created by Angelelz on 9/3/2024 in
#support
Solid way to Show components based on information from the session or cookies or server only data?
No you add a "use server" to the async function that createAsync calls
18 replies