File tree Expand file tree Collapse file tree 3 files changed +16
-8
lines changed
Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
2- import ReactDOM from 'react-dom' ;
2+ import ReactDOM from 'react-dom/client ' ;
33import ChartViewer from './ChartViewer' ;
44
5- ReactDOM . render ( < ChartViewer /> , document . getElementById ( 'root' ) ) ;
5+ const root = ReactDOM . createRoot ( document . getElementById ( 'root' ) ) ;
6+
7+ root . render (
8+ < React . StrictMode >
9+ < ChartViewer />
10+ </ React . StrictMode >
11+ ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " react-fusioncharts" ,
3- "version" : " 4.0 .0" ,
3+ "version" : " 4.1 .0" ,
44 "description" : " Simple and Lightweight React component for FusionCharts JavaScript Charting Library" ,
55 "main" : " lib/ReactFC.js" ,
66 "author" : {
4545 "lodash" : " ^4.17.11" ,
4646 "nodemon" : " ^2.0.2" ,
4747 "prop-types" : " ^15.6.2" ,
48- "react" : " ^18.0.2 " ,
48+ "react" : " ^18.3.1 " ,
4949 "react-addons-test-utils" : " 15.3.0" ,
5050 "react-component-gulp-tasks" : " ^0.7.6" ,
51- "react-dom" : " ^18.0.2 " ,
51+ "react-dom" : " ^18.3.1 " ,
5252 "react-test-renderer" : " ^16.2.0" ,
5353 "serve" : " ^10.0.1" ,
54- "webpack" : " ^4.20.2 " ,
55- "webpack-cli" : " ^3 .1.1 "
54+ "webpack" : " 5.91.0 " ,
55+ "webpack-cli" : " 5 .1.4 "
5656 },
5757 "peerDependencies" : {
5858 "react" : " 0.14.0 - 18.x"
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import * as utils from './utils/utils';
44import fusionChartsOptions from './utils/options' ;
55
66class ReactFC extends React . Component {
7+ initialUnmount = false ;
78 static fcRoot ( core , ...modules ) {
89 modules . forEach ( m => {
910 if ( ( m . getName && m . getType ) || ( m . name && m . type ) ) {
@@ -35,7 +36,8 @@ class ReactFC extends React.Component {
3536 }
3637
3738 componentWillUnmount ( ) {
38- this . chartObj . dispose ( ) ;
39+ if ( ! this . initialUnmount ) this . initialUnmount = true ;
40+ else this . chartObj . dispose ( ) ;
3941 }
4042
4143 detectChanges ( nextProps ) {
You can’t perform that action at this time.
0 commit comments