Closed JR000 closed 2 years ago
@nomcopter Can we merge it? it looks like a non-breaking fix.
I plan to get this in soon! Just need to find time to batch some of this work together and cut a release - thanks for your patience.
Folded into v5.2.0 - thanks!
Fixes #184
Changes proposed in this pull request:
In React versions lower than 18 there was no need for the
сhildren
property to be in theMosaicWindowProps
, because theprops
itself was defined in @types/react/index.d.ts as:But in React 18 there is no default support for children:
Since a MosaicWindow usually has children,
children?: ReactNode | undefined
should be defined in theMosaicWindowProps
explicilty. Otherwise using the package with React 18 and trying to add children to a MosaicWindow we get the following error: