jack
jack
Explore posts from servers
SSolidJS
Created by jack on 10/28/2024 in #support
is middleware strictly for server?
Basically the request that serves the app itself (as this needs a server). Ie. Middleware only is useful w ssr false for doing things that needs to be done 1 time on server for the life of the app ?
4 replies
SSolidJS
Created by jack on 10/28/2024 in #support
is middleware strictly for server?
Only on initial request though right?
4 replies
TtRPC
Created by jack on 10/24/2023 in #❓-help
error route always getting 500 from trpc error? (next13/approuter)
For what it’s worth I’ve tried rewriting this from scratch in app router, then Astro, then Solid and still not finished the app since I made this post 😂
6 replies
TtRPC
Created by jack on 10/24/2023 in #❓-help
error route always getting 500 from trpc error? (next13/approuter)
Lol I forgot about this entirely
6 replies
SSolidJS
Created by jack on 9/27/2024 in #support
subroute not rendering on client nav
I’ll try and find the thread
8 replies
SSolidJS
Created by jack on 9/27/2024 in #support
subroute not rendering on client nav
Basically forces the layout to rerun when pathname changes, otherwise my suspense fallback wouldn’t run after initial nav to this sub path
8 replies
SSolidJS
Created by jack on 9/27/2024 in #support
subroute not rendering on client nav
If I remember correctly
8 replies
SSolidJS
Created by jack on 9/27/2024 in #support
subroute not rendering on client nav
It was recommended a bit back to me, I believe to deal with in-layout navigation
8 replies
SSolidJS
Created by jack on 9/27/2024 in #support
subroute not rendering on client nav
just bumping this 🙂
8 replies
SSolidJS
Created by jack on 9/24/2024 in #support
how to wrap one of the control components
when you say this is being smoothed out- is that on the level of implementation details, or is a new api to be surfaced that will make this easier (in the case of the latter, anything i can try to mimic in the interim to make things easy to migrate in the futuer)
6 replies
SSolidJS
Created by jack on 9/24/2024 in #support
how to wrap one of the control components
cool, yea this honestly makes the markup far easier to reason about imo
6 replies
SSolidJS
Created by jack on 8/26/2024 in #support
useSubmission pending state resolves on url change?
Update: Almost positive it's a result of the url change; when i remove the url from the picture and just have it be a signal toggle, the pending state works properly
6 replies
SSolidJS
Created by jack on 8/26/2024 in #support
useSubmission pending state resolves on url change?
and this is the code i pass down to my buttons via props to use for disabled attr
const disableActionButtons = createMemo(() => {
return useSubmission(buttonActions.save).pending;
});
const disableActionButtons = createMemo(() => {
return useSubmission(buttonActions.save).pending;
});
6 replies
SSolidJS
Created by jack on 8/26/2024 in #support
useSubmission pending state resolves on url change?
important point: args.setView() updates searchParams. i think this is messing up action state for some reason
save: action(async () => {
// ... grab the data to send to server
toasts.submitting();

try {
// when i call this, the issues happen
args.setView("read");

// this is rpc via "use server"
await api.updateUserSelectionsByOrderDiff({
source: sourceTuples,
edited: editedTuples,
userId: args.userId(),
});

// await so i don't fire my toast until the ui has the revalidated data
await revalidate(getSelections.keyFor(args.userId()));

toasts.succeed();
} catch (error) {
// fallback to old state if error
if (error instanceof Error) {
await revalidate(getSelections.keyFor(args.userId()));

toasts.error(`An error occurred, please try again.`);
}
}
}),
save: action(async () => {
// ... grab the data to send to server
toasts.submitting();

try {
// when i call this, the issues happen
args.setView("read");

// this is rpc via "use server"
await api.updateUserSelectionsByOrderDiff({
source: sourceTuples,
edited: editedTuples,
userId: args.userId(),
});

// await so i don't fire my toast until the ui has the revalidated data
await revalidate(getSelections.keyFor(args.userId()));

toasts.succeed();
} catch (error) {
// fallback to old state if error
if (error instanceof Error) {
await revalidate(getSelections.keyFor(args.userId()));

toasts.error(`An error occurred, please try again.`);
}
}
}),
6 replies
SSolidJS
Created by jack on 8/26/2024 in #support
useSubmission pending state resolves on url change?
It’s not really the revalidation that’s my issue but yes I can show some code later
6 replies
SSolidJS
Created by Raqueebuddin Aziz on 8/9/2024 in #support
how do form actions revalidate data?
thank you
8 replies
SSolidJS
Created by Raqueebuddin Aziz on 8/9/2024 in #support
how do form actions revalidate data?
ok true that makes sense
8 replies
SSolidJS
Created by Raqueebuddin Aziz on 8/9/2024 in #support
how do form actions revalidate data?
Just stumbled across this- is there a reason for this? feels a bit aggressvie to revalidate everything on each action
8 replies
SSolidJS
Created by jack on 8/25/2024 in #support
use of cache causing page not to render at all on client nav
that was the issue ^, in case anyone ever reads this
4 replies
SSolidJS
Created by jack on 8/25/2024 in #support
use of cache causing page not to render at all on client nav
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: {
...
}) => {
},
};
4 replies