Skip to content

Conversation

@BLuEScioN
Copy link
Contributor

@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):

@vercel
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

@codecov
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!

@vercel vercel bot temporarily deployed to Preview – hiro-explorer February 13, 2025 06:06 Inactive
@BLuEScioN BLuEScioN force-pushed the feat/move-network-state-to-redux branch from 6c0ac4a to 661ccee Compare February 13, 2025 06:21
@vercel vercel bot temporarily deployed to Preview – hiro-explorer February 13, 2025 06:24 Inactive
@He1DAr He1DAr marked this pull request as draft June 17, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants