Skip to content

Commit fe23a85

Browse files
authored
Support React 18 Strict Mode / useEffect (#24)
1 parent fbdfe85 commit fe23a85

File tree

5 files changed

+14319
-14651
lines changed

5 files changed

+14319
-14651
lines changed

example/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import React from 'react'
2-
import ReactDom from 'react-dom'
2+
import { createRoot } from 'react-dom/client'
33
import App from './App'
44

5-
ReactDom.render(
6-
<App />,
7-
document.getElementById('app')
5+
createRoot(document.getElementById('app')).render(
6+
<React.StrictMode>
7+
<App />
8+
</React.StrictMode>
89
)

lib/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)