How Do I Update Client Signals When Using "use server";
I've set up a Supabase AuthService that tracks the error state with a signal.
If I get an error from Supabase, I set the error state in my AuthService file. Here's an example from my Logout function:
Any pages that use the AuthService can import the
This works great when I do everything on the client.
BUT, I'm running into trouble when I have to use "use server";. If I use setSupabaseError() from the server, the DOM does not update.
For context, here's my action for deleting an account.
So, how can I update a client-side signal when using "use server";?
The docs state the following about Global state and the server:
"It is recommended that application state should always be provided via Context instead of relying on global."
So, do I need to use context?
Meta frameworks are new to me, so please excuse my ignorance
Thank you!
Chris
If I get an error from Supabase, I set the error state in my AuthService file. Here's an example from my Logout function:
Any pages that use the AuthService can import the
supabaseError signal, and display error messages when supabaseError().length > 0.This works great when I do everything on the client.
BUT, I'm running into trouble when I have to use "use server";. If I use setSupabaseError() from the server, the DOM does not update.
For context, here's my action for deleting an account.
So, how can I update a client-side signal when using "use server";?
The docs state the following about Global state and the server:
"It is recommended that application state should always be provided via Context instead of relying on global."
So, do I need to use context?
Meta frameworks are new to me, so please excuse my ignorance
Thank you!
Chris
