Skip to content

Proofread Passing Props to a Component - #5129

Open
tuukka wants to merge 1 commit into
reactjs:mainfrom
tuukka:patch-1
Open

Proofread Passing Props to a Component#5129
tuukka wants to merge 1 commit into
reactjs:mainfrom
tuukka:patch-1

Conversation

@tuukka

@tuukka tuukka commented Sep 28, 2022

Copy link
Copy Markdown

No description provided.

@github-actions

Copy link
Copy Markdown

Size Changes

Details

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

This PR introduced no changes to the javascript bundle 🙌

## Familiar-looking props {/*familiar-props*/}

Props are the information that you pass to a JSX tag. For example, `className`, `src`, `alt`, `width`, and `height` are some of the props you can pass to an `<img>`:
Props are the information that you pass to a React element. For example, `className`, `src`, `alt`, `width`, and `height` are some of the props you can pass to an `img` element:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're deemphasizing the concept of "elements" in the new docs. They're kind of fading into background a bit as an implementation detail. E.g. JSX transform doesn't even call createElement. We want to discourage their introspection too. So I'm not sure we'd like to rely on this terminology.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I see a draft of the new terminology somewhere? As element, tag, and attribute are HTML/XML terminology, I'd expect them to be used with JSX and React as well, regardless of the implementation choices. I currently think of tags and attributes as markup syntax and of elements as component instances. Then, props (encompassing children and lacking key) are what the component instance receives. Am I far off?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants