Closed roll closed 20 hours ago
Interestingly, why rollup
is not catching the import config from Vite. I'll investigate. Upd. the vite configs are different (desktop/client)
Latest commit: |
140ee94
|
Status: | ✅ Deploy successful! |
Preview URL: | https://e4a5743f.opendataeditor.pages.dev |
Branch Preview URL: | https://430-consolidate-stores.opendataeditor.pages.dev |
Looks good @roll ! A lot cleaner :)
Agree that we need to have tests ASAP. Now that we are finishing the workflows we could start implementing them.
Thanks! I use this approach in new projects, and I think it's more readable/maintainable compared to the default Zustand patterns. Also immer
allows stop thinking about the way state was changed (like creating new copies of array/object to trigger re-renders) and just program the changes itself
Historically, the application was started as a set of independent components (to be shared for Frictionless Universe), and the modular pattern was used consistently for even high-level components like applications/controllers. Now we have some time to refactor it, so using a global/static store will bring many pros:
Untitled_ Jun 28, 2024 11_13 AM.webm
It's a massive change that would be totally dangerous to do in JavaScript without tests in-place but in TypeScripe we can be 98% sure that it's properly migrated as it won't pass type checking otherwise.
Anyway, I added an example of testing for the store -- it will be good to write tests ASAP.