-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate Application store to the global/static one #447
Conversation
Interestingly, why |
Deploying opendataeditor with Cloudflare Pages
|
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 |
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.