3 ms·
First, when I joined the project, it wasn’t clear how it would be published. Svelte, which outputs compiled JavaScript, can fit into many CMS workflows that new
by zV62drdTw6CM 2y ago
First, when I joined the project, it wasn’t clear how it would be published. Svelte, which outputs compiled JavaScript, can fit into many CMS workflows that newspapers/publishers use.
I believe Svelte was developed by Rich Harris at the NY Times for this very reason.
We ended up using iFrames, so other frameworks like React could have been used.
Second, Svelte is very well suited for these small interactives because it has built-in state, transitions, and reactivity with low overhead.
Third, it was a personal choice, as I now do most of my work in Svelte.
- 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.