Skip to content

Commit c09a3c6

Browse files
committed
fix(web-demo): add PropsWithChildren to Layout for React 18
In @types/react@18, FunctionComponent no longer implicitly includes children in props. Explicitly type Layout with React.PropsWithChildren to restore the previous behavior. TICKET: VL-5111
1 parent bf7a90e commit c09a3c6

File tree

1 file changed

+1
-1
lines changed
  • modules/web-demo/src/components/Layout

1 file changed

+1
-1
lines changed

modules/web-demo/src/components/Layout/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { FunctionComponent } from 'react';
22
import Navbar from '../Navbar/index';
33
import { AppContainer, RouteContainer } from './styles';
44

5-
const Layout: FunctionComponent = ({ children }) => {
5+
const Layout: FunctionComponent<React.PropsWithChildren> = ({ children }) => {
66
return (
77
<AppContainer>
88
<Navbar />

0 commit comments

Comments
 (0)