12 ms·
I had a similar response when reading "React adapter allows you to access signals directly inside your components and will automatically subscribe to them." I
by zerovox 4y ago
I had a similar response when reading "React adapter allows you to access signals directly inside your components and will automatically subscribe to them."
I don't believe this is worth it. The implementation is fairly dangerous and fragile as you point out, all in order to simplify something fairly clean/reacty such as `const value = useSignalValue(signal)` into `signal.value`.
- iainmerrick 4y agoThe difference (as I understand it) is that you don’t need to list your dependencies as you would with a hook, and you can call it anywhere. I find this approach conceptually simpler than hooks.
- capableweb 4y agoInvisible dependencies and avoid referential transparency sounds more complex to me than the opposite (upfront dependencies and referential transparency), not simpler.
- jitl 4y agoSure, but you could at least wrap the whole component in observer(MyComponent) like Mobx and avoid all this skullduggery with the internals.