File tree Expand file tree Collapse file tree
elisa/src/client/RunDetails Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import React from 'react' ;
2- import ReactDOM from 'react-dom' ;
2+ import { createRoot } from 'react-dom/client ' ;
33import { App } from '@labkey/api' ;
44
55import { AppContext , RunDetails } from './RunDetails' ;
66
77import './RunDetails.scss' ;
88
99App . registerApp < AppContext > ( 'elisaRunDetails' , ( target : string , ctx : AppContext ) => {
10- ReactDOM . render ( < RunDetails context = { ctx } /> , document . getElementById ( target ) ) ;
10+ createRoot ( document . getElementById ( target ) ) . render ( < RunDetails context = { ctx } /> ) ;
1111} ) ;
Original file line number Diff line number Diff line change 11import React from 'react' ;
2- import ReactDOM from 'react-dom' ;
2+ import { createRoot } from 'react-dom/client ' ;
33import { App } from '@labkey/api' ;
44
55import { AppContext , RunDetails } from './RunDetails' ;
66
77import './RunDetails.scss' ;
88
9- App . registerApp < AppContext > ( 'elisaRunDetails' , ( target : string , ctx : AppContext ) => {
10- ReactDOM . render ( < RunDetails context = { ctx } /> , document . getElementById ( target ) ) ;
11- } , true /* hot */ ) ;
9+ const render = ( target : string , ctx : AppContext ) : void => {
10+ createRoot ( document . getElementById ( target ) ) . render ( < RunDetails context = { ctx } /> ) ;
11+ } ;
1212
13+ App . registerApp < AppContext > ( 'elisaRunDetails' , render , true ) ;
You can’t perform that action at this time.
0 commit comments