brisa-build / brisa

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

fix: init store only once when no web-components #645

Closed aralroca closed 1 day ago

aralroca commented 1 day ago

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

Adding an id fixes multi-executions of the same script during SPA, solving the store updates. This bug only happened in a page without any web component, with only the RPC code for the server actions.

Before:

https://github.com/user-attachments/assets/efced3d3-31d5-49b2-88c8-dbe2a3d94730

Now:

https://github.com/user-attachments/assets/428f0081-c6eb-4c50-81cd-988e4b539ba1

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

Open in Stackblitz

brisa-adapter-vercel

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

brisa-pandacss

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

brisa

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

brisa-tailwindcss

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

create-brisa

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

www

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

commit: 1722b79