Skip to content

Commit b0c3db0

Browse files
authored
Add support for React 18 (#225)
1 parent 84dc256 commit b0c3db0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

index.d.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ declare module 'react-universal-component' {
33

44
type ReportChunksProps = {
55
report(chunkName: string | undefined): void;
6+
children?: React.ReactNode;
67
};
78

89
export class ReportChunks extends React.Component<ReportChunksProps> {}
910

1011
type ComponentType<P> =
1112
| React.ComponentType<P>
12-
| React.StatelessComponent<P>
13+
| React.FunctionComponent<P>
1314
| React.ComponentClass<P>
1415
| React.Component<P>;
1516

@@ -62,7 +63,7 @@ declare module 'react-universal-component' {
6263
): void;
6364
};
6465

65-
type UniversalComponent<P> = React.StatelessComponent<
66+
type UniversalComponent<P> = React.FunctionComponent<
6667
P & Partial<UniversalProps>
6768
> & {
6869
preload(props?: P): void;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"travis-github-status": "^1.6.3"
7575
},
7676
"peerDependencies": {
77-
"react": "^16.3.0 || ^17.0.0"
77+
"react": "^16.3.0 || ^17.0.0 || ^18.0.0"
7878
},
7979
"config": {
8080
"commitizen": {

0 commit comments

Comments
 (0)