I'm proposing an alternative: what if you just ban eager read
Pawel Kozlowski
@pkozlowski_os
I can see 3 options to solve "accessing reactive primitives in a non-reactive context": - make "everything" reactive context (React); - make reactive boundaries explicit (ex. createEffect in Solid, $: in Svelte); - disallow reads of reactive atoms outside of the reactive context. twitter.com/sebmarkbage/st…
13:09 PM - 21 Jun 2022
Sebastian Markbåge
@sebmarkbage
@lxsmnsyc @RyanCarniato @flaviocopes@srsholmes@wesbos @sveltejs Yea and Svelte is the same, especially when using equivalents to Hooks. Which is fine, but in my mind you shouldn’t have access to props in those code paths. Except as input to “initial state”. It’s too easy to use the initial stale props. Otherwise I love the simplicity of it.
3Shain
@san3shain
@pkozlowski_os The 3rd option makes the most sense IMO. It's the only one I found which is very likely to get along with concurrency, I mean, "perfectly".
08:00 AM - 22 Jun 2022
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'm proposing an alternative: what if you just ban eager read