You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to increase the compatibility of SSR redirects from server functions:
Problem
With axum in the backend as an example, the redirects emitted from the server functions with an utility like leptos_axum::redirect(cx, path) makes a request in the browser, but it doesn't redirects in the application(wasm).
To accomplish that, we need to not do a redirect, but instead, create a Response case that handle that in the client. Something like:
let navigate = use_navigate(cx);match msg {
...Ok(EditorResponse::Redirect) => navigate("/login",NavigateOptions::default()).unwrap(),
...}
What we really want is to keep the redirect from the server fn(so in case there is no wasm or js, the redirect will still do his job) and handle it in the client.
Solution
A <Redirect /> component for the integrations:
Axum
Actix
The text was updated successfully, but these errors were encountered:
Motivation
We need to increase the compatibility of SSR redirects from server functions:
Problem
With axum in the backend as an example, the redirects emitted from the server functions with an utility like
leptos_axum::redirect(cx, path)
makes a request in the browser, but it doesn't redirects in the application(wasm).To accomplish that, we need to not do a redirect, but instead, create a Response case that handle that in the client. Something like:
What we really want is to keep the redirect from the server fn(so in case there is no wasm or js, the redirect will still do his job) and handle it in the client.
Solution
A
<Redirect />
component for the integrations:The text was updated successfully, but these errors were encountered: