News for hackers. Stuff that matters.
Re:Show HN: Brisa Framework launch is here | The Web Platfor... by aralroca on Sunday October 06, 2024 @10:28AM (#41757391)
We are not using a Proxy, the implementation of the signals is as follows: https://github.com/brisa-build/brisa/blob/main/packages/bris...

By rule, reactivity is broken if you declare a variable using the getter (.value) outside the JSX. This is because the component is called once, and during the rendering of the DOM elements, effect wrappers are added to register the getters (.value) of any signals.

However, to make life easier for developers, we make some optimizations in build time, to:

1. Support early returns.

2. Not having to use .value in the props (well, “WC attributes”) and being able to define default values, do destructuring, etc. without losing reactivity.

Apart from these exceptions, it is as I said at the beginning.

Re:Show HN: Brisa Framework launch is here | The Web Platfor... by jitl on Sunday October 06, 2024 @03:48PM (#41759710)
How does the props part work? That is the part I find confusing