The children parameter gave an error in PrimaryLayout.tsx using React 18. Apparently, this is because they removed the implicit children in the React.FunctionComponent type.
I got it to work by adding them here:
export interface IPrimaryLayout {}
like this
export interface IPrimaryLayout {
children?: React.ReactNode
}