3 ms·
The state that is handled by svelte is not automatically visible to react and vice-versa. That's the whole point of the question.
by aatd86 3y ago
The state that is handled by svelte is not automatically visible to react and vice-versa.
That's the whole point of the question.
- horsawlarway 3y agoI guess my response is: "So make it visible". Because that's easy to do with any manner of methods. Sure - each library is going to do its own thing with regards to how it manages it's internal DOM and state, but that does not matter at all. All you care about in wiring them together is: "Can I call some js code in response to state change in svelte?" and "Can I call some js code in response to a state change in react?" and the answer to both is a resounding "Yes!". So now I can easily make the state of one visible to the other... I just run some code in response to a change on either side that updates the state of the other - done. If you want to get adventurous - you can automate the entire thing away with a proxy store, so it happens everywhere by default.