File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed
Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22
33import React from 'react' ;
4- import ReactDOM from 'react-dom' ;
4+ import ReactDOMClient from 'react-dom/client ' ;
55import Avatar , {
66 getRandomColor ,
77 ConfigProvider ,
@@ -453,8 +453,8 @@ var mountNode = document.getElementById('container');
453453// Enable strict mode when supported by react version
454454var Wrapper = React . StrictMode || 'div' ;
455455
456- ReactDOM . render ( (
456+ ReactDOMClient . createRoot ( mountNode ) . render (
457457 < Wrapper >
458458 < Demo />
459459 </ Wrapper >
460- ) , mountNode ) ;
460+ ) ;
Original file line number Diff line number Diff line change @@ -56,6 +56,6 @@ class TypeTest extends Component {
5656 < Avatar />
5757 </ ConfigProvider >
5858 </ div >
59- )
59+ ) ;
6060 }
6161}
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ interface CreateAvatarOptions {
9595 sources ?: SourceConstructor [ ]
9696}
9797
98- export interface ConfigProvider {
98+ export interface ConfigProvider extends React . PropsWithChildren {
9999 /**
100100 * A list of color values as strings from which the getRandomColor picks one at random.
101101 */
Original file line number Diff line number Diff line change 4242 "peerDependencies" : {
4343 "@babel/runtime" : " >=7" ,
4444 "core-js-pure" : " >=3" ,
45- "react" : " ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" ,
45+ "react" : " ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 " ,
4646 "prop-types" : " ^15.0.0 || ^16.0.0"
4747 },
4848 "devDependencies" : {
5353 "@babel/preset-env" : " ^7.7.7" ,
5454 "@babel/preset-react" : " ^7.7.4" ,
5555 "@babel/runtime" : " ^7.16.0" ,
56- "@types/react" : " ^16 .0.0 " ,
56+ "@types/react" : " ^19 .0.8 " ,
5757 "babel-eslint" : " ^10.0.3" ,
5858 "babel-loader" : " ^8.0.6" ,
5959 "babel-plugin-polyfill-corejs3" : " ^0.3.0" ,
6363 "eslint-plugin-react" : " ^7.17.0" ,
6464 "file-loader" : " ^5.0.2" ,
6565 "gh-pages" : " ^6.1.1" ,
66- "react" : " ^17 .0.1 " ,
67- "react-dom" : " ^17 .0.1 " ,
68- "typescript" : " ^5.4.5 " ,
66+ "react" : " ^19 .0.0 " ,
67+ "react-dom" : " ^19 .0.0 " ,
68+ "typescript" : " ^5.7.3 " ,
6969 "webpack" : " ^5.72.1" ,
7070 "webpack-bundle-analyzer" : " ^3.6.0" ,
7171 "webpack-cli" : " ^5.1.4" ,
You can’t perform that action at this time.
0 commit comments