Skip to content

Commit

Permalink
ARTESCA-13975 // Migration to React 18
Browse files Browse the repository at this point in the history
  • Loading branch information
hervedombya committed Nov 19, 2024
1 parent 97e0434 commit b142a72
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 88 deletions.
125 changes: 45 additions & 80 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
"devDependencies": {
"@module-federation/enhanced": "^0.2.2",
"@types/jest": "^26.0.23",
"@types/react": "^17.0.11",
"@types/react-dom": "^17.0.8",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"jest": "^27.0.5",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"typescript": "^5.3.3"
},
"peerDependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions src/ModuleFederation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export function FederatedComponent({
}

export const lazyWithModules = <Props extends {}>(
functionComponent: FunctionComponent<Props>,
functionComponent: FunctionComponent<React.PropsWithChildren<Props>>,
...modules: { module: string; url: string; scope: string }[]
) => {
return React.lazy(async () => {
Expand Down Expand Up @@ -139,7 +139,7 @@ export const ComponentWithFederatedImports = <Props extends {}>({
renderOnError?: ReactNode;
renderOnLoading?: ReactNode;
componentWithInjectedImports: FunctionComponent<
Props & { moduleExports: Record<string, unknown> }
React.PropsWithChildren<Props> & { moduleExports: Record<string, unknown> }
>;
componentProps: Props;
federatedImports: {
Expand Down

0 comments on commit b142a72

Please sign in to comment.