brisa-build / brisa

The Web Platform Framework.
https://brisa.build
MIT License
452 stars 12 forks source link

fix: transform hard to soft redirect when it comes from SPA #587

Closed aralroca closed 1 month ago

aralroca commented 1 month ago

Fixes https://github.com/brisa-build/brisa/issues/577

Now from the middleware, if you send Response with redirects and you are in the middle of a SPA navigation or a Server Action, the RPC Client knows how to manage it using a soft redirect and keeping the store.

@AlbertSabate I have clarified in the Middleware rewrite documentation with the proposals you made to me in the previous PR.

pkg-pr-new[bot] commented 1 month ago

Open in Stackblitz

brisa-adapter-vercel

``` bun add https://pkg.pr.new/brisa-build/brisa/brisa-adapter-vercel@587 ```

brisa

``` bun add https://pkg.pr.new/brisa-build/brisa@587 ```

brisa-pandacss

``` bun add https://pkg.pr.new/brisa-build/brisa/brisa-pandacss@587 ```

create-brisa

``` bun add https://pkg.pr.new/brisa-build/brisa/create-brisa@587 ```

www

``` bun add https://pkg.pr.new/brisa-build/brisa/www@587 ```

brisa-tailwindcss

``` bun add https://pkg.pr.new/brisa-build/brisa/brisa-tailwindcss@587 ```

commit: b6420f2