Skip to content
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

feat: move network state to redux #2004

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BLuEScioN
Copy link
Collaborator

@BLuEScioN BLuEScioN commented Feb 13, 2025

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Moves network state to redux

When you already have both systems in place, it's generally cleaner and more maintainable to consolidate state management in Redux. Here's why:

Predictable State Location

  • Having state split between two systems makes it harder to track where state lives
  • Makes debugging more complex
  • Complicates state persistence
  • Makes it unclear where new state should go

Redux is generally a better place to store state

  • Built for large-scale state management with powerful dev tools
  • More efficient for frequent updates to many components due to its subscription model
  • Middleware support for side effects, logging, etc.
  • Built-in performance optimizations and selective re-rendering
  • State persistence and time-travel debugging
  • Better for complex state interactions and global app state

Consolidating in Redux provides better maintainability and debugging capabilities with minimal performance overhead.

Issue ticket number and link

Checklist:

  • I have performed a self-review of my code.
  • I have tested the change on desktop and mobile.
  • I have added thorough tests where applicable.
  • I've added analytics and error logging where applicable.

Screenshots (if appropriate):

Copy link

vercel bot commented Feb 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
explorer-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 13, 2025 6:24am
hiro-explorer ❌ Failed (Inspect) Feb 13, 2025 6:24am

Copy link

codecov bot commented Feb 13, 2025

Codecov Report

Attention: Patch coverage is 25.67568% with 55 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/common/state/slices/network-slice.ts 25.49% 37 Missing and 1 partial ⚠️
src/common/state/ReduxStateInitializer.tsx 0.00% 15 Missing and 1 partial ⚠️
src/app/_components/Providers.tsx 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

1 participant