File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 1- import React , { useRef , useEffect } from "react" ;
1+ import React , { useRef } from "react" ;
22import { JsonEditor } from "jsoneditor-react" ;
33import ace from "brace" ;
44import "brace/mode/json" ;
@@ -13,10 +13,6 @@ const JSONEditor: React.FC<TypeJsonProps> = function ({
1313} ) {
1414 const jsonEditorRef = useRef < JsonEditor | null > ( null ) ;
1515
16- useEffect ( ( ) => {
17- jsonEditorRef ?. current ?. set ( value ) ;
18- } , [ value ] ) ;
19-
2016 const setRef = ( instance : any ) => {
2117 jsonEditorRef . current = instance ?. jsonEditor ;
2218 } ;
Original file line number Diff line number Diff line change 11/* Import React modules */
22import React from "react" ;
3- import ReactDOM from "react-dom" ;
3+ import { createRoot } from "react-dom/client " ;
44/* Import other node modules */
55import reportWebVitals from "./reportWebVitals" ;
66/* Import our modules */
@@ -9,14 +9,15 @@ import App from "./containers/App";
99/* Import our CSS */
1010import "./index.css" ;
1111
12- ReactDOM . render (
12+ const container = document . getElementById ( "root" ) as HTMLElement ;
13+ const root = createRoot ( container ) ; // createRoot(container!) if you use TypeScript
14+ root . render (
1315 < React . StrictMode >
1416 < App />
15- </ React . StrictMode > ,
16- document . getElementById ( "root" )
17+ </ React . StrictMode >
1718) ;
1819
1920// If you want to start measuring performance in your app, pass a function
2021// to log results (for example: reportWebVitals(console.log))
2122// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
22- reportWebVitals ( ) ;
23+ reportWebVitals ( ) ;
You can’t perform that action at this time.
0 commit comments