-
Notifications
You must be signed in to change notification settings - Fork 3
Replace Redux with Zustand for state management #163
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
Conversation
Co-authored-by: reyery <[email protected]>
Co-authored-by: reyery <[email protected]>
Co-authored-by: reyery <[email protected]>
Co-authored-by: reyery <[email protected]>
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This PR completes the migration from Redux to Zustand for state management in the CityEnergyAnalyst-GUI application, significantly simplifying the codebase and reducing boilerplate.
What Changed
✅ Core Migration Complete
toolsStore.js
- handles tool list, parameters, and saving statejobsStore.js
- manages job creation, updates, and deletionnavigationStore.js
- replaces connected-react-router for routingdatabaseEditorStore.js
- Zustand equivalent (not yet used)🔧 Component Migrations
Migrated 15+ components from Redux to Zustand:
Tool.jsx
JobInfoList.jsx
,JobInfoCard.jsx
ScenarioRow.jsx
,Toolbar.jsx
,BottomToolButtons.jsx
App.jsx
,HomePage.jsx
,main.jsx
,StatusBar.jsx
hooks.jsx
,ValidationErrors.jsx
🗑️ Cleanup & Dependencies
connected-react-router
,redux-logger
Before vs After
Before: Complex Redux setup with actions, reducers, middleware, and connected-react-router
After: Simple Zustand stores with direct state access
Architecture
Benefits
Testing
Fixes #162.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.