Skip to content

Add section about not spreading props #1443

Description

@ljharb

Spread props should be avoided, except for exceptions like:

  • HOCs that proxy down props and hoist propTypes
  • spreading objects with known, explicit props - like if you construct an object literal (statically or via a "pick" pattern) and then promptly spread it
  • others?

Let's add a section to the React guide about this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions