Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stylistic nits #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Stylistic nits #7

wants to merge 1 commit into from

Conversation

eps1lon
Copy link

@eps1lon eps1lon commented Jun 15, 2021

Some stylistic nitpicks I found when reading. Feel free to toss out everything that you don't agree with.

@@ -72,7 +72,7 @@ The actual updates happen at the end, and the component renders `3`.

## startTransition (opt-in)

`startTransition` can be used to mark UI updates that do not need urgent resources for updating. For eg: when typing in a typeahead field, there are two things happening - a blinking cursor that shows visual feedback of your content being typed, and a search functionality in the background that searches for the data that is typed.
`startTransition` can be used to mark UI updates that do not need urgent resources for updating. For example: when typing in a typeahead field, there are two things happening - a blinking cursor that shows visual feedback of your content being typed, and a search functionality in the background that searches for the data that is typed.
Copy link
Author

Choose a reason for hiding this comment

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

e.g. already stands for "for example": https://www.merriam-webster.com/dictionary/e.g.

@@ -5,7 +5,7 @@
Let's take a look at the major new features of React 18:

## Root API (new feature)
React 18 introduces Root API `ReactDOM.createRoot`. Before React 18, we used `ReactDOM.render` to render a component to the page. Going forward with React 18, we will use ReactDOM.createRoot to create a root, and then pass the root to the render function. The good news is that your current code with `ReactDOM.render` will still work, however, it is recommended to start transitioning to `createRoot` as `render` will be marked `deprecated` starting React 18.
React 18 introduces a new Root API: `ReactDOM.createRoot`. Before React 18, we used `ReactDOM.render` to render a component to the page. Going forward with React 18, we will use `ReactDOM.createRoot` to create a root, and then pass the component to the render function. The good news is that your current code with `ReactDOM.render` will still work, however, it is recommended to start transitioning to `createRoot` as `render` will be marked `deprecated` starting React 18.
Copy link
Author

Choose a reason for hiding this comment

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

first you say "ReactDOM.render to render a component" then "pass the root to the render function" and below in the demo you added the comment "//render app to root". The three different wordings might be confusing. So I suggested making it consistent with "pass component to render" across the board.

@eps1lon eps1lon marked this pull request as ready for review June 15, 2021 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant