News for hackers. Stuff that matters.
Re:TinyBase: A JavaScript library for structured state by hamilton on Monday January 17, 2022 @10:14AM (#29967328)
love this. I similarly use immer for just about every svelte project I build & maintain.
Re:TinyBase: A JavaScript library for structured state by injidup on Monday January 17, 2022 @12:42PM (#29969156)
When I built this I used immer under the hood. But actually I think it is not required. I'd have to have another look. I'm not really a front end dev but I just felt the whole "store" concept in svelte was incomplete and I could never understand the react/redux model. I had implemented something in .net years ago to simulate functional lenses and when I looked into immer I saw this JS proxy thing and realised I could easily build fully reactive lenses for svelte. In the end mostly an academic exercise as it is used in one internal office website and my day job is writing algorithms for CNC machines.