Skip to content

Prop Drilling vs. Redux #824

Open
Open
@meiamsome

Description

@meiamsome

Nature of issue?

  • Question about the source code

Hello,
I was wondering why there is plenty of prop-drilling from the root-level components down, even when sub-components are connected to redux. For example IDE and Nav components are both connected, but IDE passes down a lot of the properties manually. This leads to very verbose code that can be hard to read in my opinion and means that I spend a lot of time going up and down the hierarchy following props when they just come from redux in the end. There are also some performance considerations where a change of state will re-render all the components down from the route connect() call to where the prop is used, rather than just the section that needs re-rendering

For the Nav item, I have made an example refactoring here: meiamsome@89f850c

I would be happy to PR some similar refactoring for other components if you think that makes sense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugError or unexpected behaviorsPriority:HighShould be addressed soon but not critical

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions