Skip to content

Commit

Permalink
chore: upgrade demo to react 18.3
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars committed May 23, 2024
1 parent 058f0e6 commit 354357d
Show file tree
Hide file tree
Showing 4 changed files with 689 additions and 54 deletions.
5 changes: 3 additions & 2 deletions demo/js/demo.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const React = require('react')
const ReactDOM = require('react-dom')
const ReactDOM = require('react-dom/client')
const Refractor = require('../../src/Refractor')
const h = React.createElement

Expand Down Expand Up @@ -79,7 +79,8 @@ class ReactRefractorDemo extends React.Component {
}
}

ReactDOM.render(h(ReactRefractorDemo), document.getElementById('root'))
const root = ReactDOM.createRoot(document.getElementById('root'))
root.render(h(ReactRefractorDemo))

// Hiding this ugliness down here.
function getDefaultValue() {
Expand Down
659 changes: 657 additions & 2 deletions demo/js/demo.min.js

Large diffs are not rendered by default.

75 changes: 27 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"eslint-config-sanity": "^6.0.0",
"jest": "^27.5.1",
"prettier": "^2.6.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"webpack": "^5.72.0",
"webpack-cli": "^4.9.2"
},
Expand Down

0 comments on commit 354357d

Please sign in to comment.