Mixing usage of deepsignal entrypoints leads to unexpected results
wittjosiah opened this issue · comments
Behaviour:
I don't have time to make a standalone reproduction, but wanted to make you aware of this issue.
- Import from
deepsignal
in one part of application code. - Import from
deepsignal/react
in another part of application code. - Have those two pieces of code interact with each other.
- Lose reactivity.
Observation:
Each entrypoint for deepsignal is bundled entirely separately and has their own WeakMap
rather than the react entrypoint depending on the core entrypoint, which seems to make them incompatible with each other.
Expected behaviour:
I would have expected react to be a thin layer on top of core and for the two to be interoperable with each other within an application.
There's no benefit to using deepsignal
when you also need deepsignal/react
. My recommendation is always to use the react one. If you want to import an external package that uses deepsignal
, you can alias it to deepsignal/react
.
Closing now as not planned, but feel free to reopen if more issues arise 🙂