Hacker News new | past | comments | ask | show | jobs | submit login

I see Solid uses proxy to 'get' and 'notice update' the state. This seems providing a better DX than s-js. However, Solid require developer to explicitly use 'react style/hook' to update the state.

Why not also use proxy to 'set' and 'notice update' on the state?




I'm big on read/write segregation and explicit mutation. With simple signals you have this naturally. Once you move to a nested tree you can lose this. Keeping this control allows us to adopt immutability patterns and enforce unidirectional flow. To me this is the most sane way to deal complex reactivity.


I agree, then the way to read and update state with dependency tracing in solid seems meeting the sweet spot of the s-js and elm/react style.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: