* Replaced old ReactDOM API with new React v18 API
Replaced old ReactDOM API with new React v18 API
ReactDOM.render(
// Try changing to isLoggedIn={true}:
<Greeting isLoggedIn={false} />,
document.getElementById('root')
);
The above implementation has been replaced by the following implementation according to React v18.
ReactDOM
.createRoot(document.getElementById('root'))
.render(<LoginControl />);
* Changed ReactDOM.createRoot syntax into two lines
```
ReactDOM
.createRoot(document.getElementById('root'))
.render(<LoginControl />);
```
has been changed to
```
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<LoginControl />);
```
* Added a comment on <Greeting/> comp.
* fix the code block for createRoot typescript error
* added example block code for typescript
* Inline example
Co-authored-by: dan <dan.abramov@gmail.com>
* fix the code block for AppWithCallbackAfterRender
fix the code block for AppWithCallbackAfterRender by using createRoot method from 'react-dom/client'
* Update 2022-03-08-react-18-upgrade-guide.md
Co-authored-by: dan <dan.abramov@gmail.com>
* Clarify note for React Native users
Just clarifying expectations for React Native users on when React 18 will be available there.
* Update content/blog/2022-03-08-react-18-upgrade-guide.md
Co-authored-by: Ricky <rickhanlonii@gmail.com>
Co-authored-by: Ricky <rickhanlonii@gmail.com>
* [18] ReactDOM reference to createRoot/hydrateRoot (#4340
)
* [18] ReactDOM reference to createRoot/hydrateRoot
* Update note about render and hydrate
* Match the warning text
* s/Render/render
* [18] Update ReactDOMClient docs (#4468
)
* [18] Update suspense docs for unexpected fallbacks (#4500
)
* [18] Update suspense docs for unexpected fallbacks
* Add inline code block
* Feedback fixes
* [18] Updated Suspense doc with behavior during SSR and Hydration (#4484
)
* update wording
* wording
* update events
* Update content/docs/reference-react.md
Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
* add link to selective hydration
* remove some of the implementation details
Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
* [18] renderToPipeableStream doc (#4485
)
* new streaming ssr api
* add readable stream
* code snippets
* Rename strict effects / unsafe effects to use the reusable state terminology (#4505
)
* Add draft of 18 release post
* Add links to speaker Twitter profiles
* [18] Update upgrade guide
* Fix typo in blog title
* [18] Blog - add note for react native
* [18] Add changelog info to blog posts
* Edit Suspense for data fetching section
* Update date
* [18] Add links
* Consistent title case
* Update link to merged RFC
* [18] Update APIs and links
* [18] Add start/useTransition docs (#4479
)
* [18] Add start/useTransition docs
* Updates based on feedback
* [18] Generate heading IDs
* Add note about Strict Mode
* Just frameworks
* Reorder, fix content
* Typos
* Clarify Suspense frameworks section
* Revert lost changes that happened when I undo-ed in my editor
Co-authored-by: salazarm <salazarm@users.noreply.github.com>
Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
Co-authored-by: Sebastian Markbåge <sebastian@calyptus.eu>
Co-authored-by: Andrew Clark <git@andrewclark.io>
Co-authored-by: dan <dan.abramov@gmail.com>