3 ms·
> We ended up using iFrames, so other frameworks like React could have been used. Wait, wasn't one of the original selling points of React that it could be emb
by kqr 2y ago
> We ended up using iFrames, so other frameworks like React could have been used.
Wait, wasn't one of the original selling points of React that it could be embedded piecewise to enhance interactivity of the parts of pages that needed it? It should certainly not need a separate page!
- gligorot 2y agoIt’s a PITA to extract a stateful react component to a standalone piece of code that can be inserted in a random place (in another page, served via API etc.). Not sure about Svelte, but achieving this in React was unexpectedly hard/impossible in our use case.
- codethief 2y agoIt doesn't.
- lexicality 2y agoIt was, but it also feels like there's now a very large gulf between React's original selling points and the mess we have today. You definitely can do it (I've done it myself including SSR hydration) but it was a massive pain to do.