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

Redux Implementation #7

Open
TBThomas56 opened this issue Apr 12, 2024 · 3 comments
Open

Redux Implementation #7

TBThomas56 opened this issue Apr 12, 2024 · 3 comments

Comments

@TBThomas56
Copy link
Collaborator

No description provided.

@callumforrester
Copy link
Contributor

This is where my react knowledge fails me, I get the impression that redux becomes necessary for sanity maintenance once a project reaches a certain level of complexity, but not sure how best to determine when we've reached that point!
@abigailalexander do you have any thoughts?

@abigailalexander
Copy link
Collaborator

The main use case for Redux is when you have many different components needing to access the same state - using the normal React way this often ends up with high level components accessing state and passing it down via props to all of the children who need it. This can get quite confusing and involve passing state through a lot of props that don't actually need it. You also have to keep track of state manipulation, because there isn't a single "source of truth" for the state. At a quick glance it seems like here the state is confined to the Table components, so you could manage just fine without adding the complexity of Redux into the project (at least at this point!). It seems like the only overlap of state between components would be the log filter and the table, though feel free to correct me if I'm wrong.

My approach to Redux is to try doing everything you need first without it, and then if it gets complicated to pass state between many components you add it in.

@callumforrester
Copy link
Contributor

Thanks, that helps a lot!

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

No branches or pull requests

3 participants