-
Notifications
You must be signed in to change notification settings - Fork 20
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
base: master
Are you sure you want to change the base?
Conversation
@@ -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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
Some stylistic nitpicks I found when reading. Feel free to toss out everything that you don't agree with.