3 ms·
Immer.js (a library to work on data structures, not a framework) uses a similar concept, using Proxies. The gist of Immer is that your framework needs immutabl
by revvx 7y ago
Immer.js (a library to work on data structures, not a framework) uses a similar concept, using Proxies.
The gist of Immer is that your framework needs immutable structures, but you want to interact with them imperatively.
It's very interesting, and a reversal of the traditional "functional core, imperative shell" architecture.
https://github.com/immerjs/immer https://github.com/immerjs/immer
- rich_harris 7y agoYep, and Svelte <3 Immer — they work nicely together.
- PKop 7y agoGreat work, just looking in to Svelte now after reviewing your latest release and video. First thing I looked for was routing, and I see Sapper is essentially batteries-included solution to using Svelte. Will these always be separate libraries? Is Sapper basically the create-svelte-app for your framework? What's the roadmap for Sapper and integrating Svelte v3 changes?
- rich_harris 7y agoBringing Sapper up to date is the next big task. In some ways yes, it's a bit like create-svelte-app, though a closer reference point if you're versed in the React world would be Next.js. We've also mulled creating a React Router equivalent, for people who prefer components-as-routes to files-as-routes.
- wintorez 7y agoI'm a huge fan of immer. I use it in all my React projects. It makes writing reducers a lot easier. Highly recommended.
- acemarke 7y agoYep, we use it in our new Redux Starter Kit package to drastically simplify immutable update logic in reducers: https://redux-starter-kit.js.org/api/createreducer https://redux-starter-kit.js.org/api/createreducer