Well, redux might be overkill. But I thought that just having stencil web components and communicating over events might be enough.
But from the stenciljs docs:
The largest deficiencies that React currently has when it comes to working with standard HTML Custom Elements is that properties that contain non-scalar data (that is, data that is not a string or number) are not passed properly and custom events are not handled properly. The solution to both of these problems is to wrap the Custom Element in a React component, obtain a ref
to the Custom Element, and use the ref
in order to set the non-scalar properties and add event listeners via addEventListener
.
I can’t do that. There doesn’t seem to be a way to have react components inside of the dynamic html.
Maybe I should switch to preact