* added sandpack linter and installed latest sandpacl
* integrate eslint into Sandpack
* Format the linting errors, disable preview on lint error, have only two react hooks
* fixes build
* split eslint-integration
* fix tooltip text color, error rename to 'Lint Error', show single lint error
* NIT
* Just enable it
* Delete eslint.md
Co-authored-by: Strek <ssharishkumar@gmail.com>
Co-authored-by: dan <dan.abramov@gmail.com>
* 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>