Skip to content

Suggestion: Have App.js not render a <Header> if nextDays is false #13

@tomduggan85

Description

@tomduggan85

One trick you could do to clean up Header.js is to have App.js not even include it, if nextDays is false. Then, instead of having to pass in nextDays as nextStatus to the Header and return null if it's false, you could remove all of that logic from Header.
It would look like this, in App.js:
{this.state.nextDays && <Header handleForm=...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions