Skip to content

Functional components - is saving props in state a good idea? #3358

Description

@AjaxSolutions

After reading the available documentation, I'm still not sure if saving props in state in functional components is a good idea or not.

Could you please clarify if this is a valid pattern and how to implement it.

https://reactjs.org/docs/hooks-faq.html#how-do-i-implement-getderivedstatefromprops
https://reactjs.org/docs/hooks-effect.html#tip-optimizing-performance-by-skipping-effects
https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html

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