S
SolidJS3mo ago
jack

use of cache causing page not to render at all on client nav

been struggling with this for like 2 hours and finally narrowed down that if any single cache() call exists in my file, my page just won't render it's content (at least on client) i have no idea why this is happening, and i'm not really sure at what point this began to happen. wondering if there are any common symptoms for this
1 Reply
jack
jack3mo ago
just after posting this i noticed that i have an api object i export and call in my cache calls. if any single function in this object isn't marked useServer, then i'm getting this issue
export const api = {
getSelectionsByUserId: async (
...
) => {
"use server";
...
},
getUserByUsername: async (username: string) => {
"use server";
...
},
updateUserSelectionsByOrderDiff: async (args: {
...
}) => {
},
};
export const api = {
getSelectionsByUserId: async (
...
) => {
"use server";
...
},
getUserByUsername: async (username: string) => {
"use server";
...
},
updateUserSelectionsByOrderDiff: async (args: {
...
}) => {
},
};
that was the issue ^, in case anyone ever reads this
Want results from more Discord servers?
Add your server