Skip to content

Commit

Permalink
Use react-dom/client for react 18 (#371)
Browse files Browse the repository at this point in the history
* Use react-dom/client for react 18

* fix lint & fix lint-staged
  • Loading branch information
bjornstar authored Apr 4, 2022
1 parent 72bde0b commit 7f5c5ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/react-three-cannon-examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
"zustand": "^3.7.1"
},
"lint-staged": {
"*.{js,ts}": "eslint --cache --fix",
"*.{js,ts,md}": "prettier --write"
"*.{js,jsx,ts,tsx}": "eslint --cache --fix",
"*.{js,json,jsx,md,ts,tsx}": "prettier --write"
},
"license": "MIT",
"sideEffects": false
Expand Down
8 changes: 6 additions & 2 deletions packages/react-three-cannon-examples/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import ReactDOM from 'react-dom'
import { createRoot } from 'react-dom/client'

import App from './App'

ReactDOM.render(<App />, document.getElementById('root'))
const root = document.getElementById('root')

if (root) {
createRoot(root).render(<App />)
}

1 comment on commit 7f5c5ef

@vercel
Copy link

@vercel vercel bot commented on 7f5c5ef Apr 4, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.