Skip to content

Missing docs about Transferring Props in JSX #109

Closed
@hellobrian

Description

@hellobrian

(Originally opened in facebook/react#11124 (comment))

I noticed that the latest docs don't talk about Transferring Props in JSX with rest properties.

/* for example */
render() {
  const { children, ...other } = this.props;
  return <button {...other}>{children}</button>
}

☝️ I felt that this was really useful for building reusable react components and an important concept to surface on the main docs. I was curious if omitting this documentation was intentional? If so, it would be great to understand why (maybe this isn't a good practice anymore?).

Otherwise, I would be happy to send a PR that adds this back into the docs with any changes you and the community want to see. Overall, I just think this is important info to surface in the current docs.

Thanks!

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