Type '(matches: boolean) => void' is not assignable to type 'ReactNode | ((matches: boolean) => ReactNode)'.
Type '(matches: boolean) => void' is not assignable to type '(matches: boolean) => ReactNode'.
Type 'void' is not assignable to type 'ReactNode'.ts(2322)
If I switch the curly brackets for parentheses, the error correctly disappears:
This improves types when render props are used. It will raise an error when you mistakenly forget to return a value:
If I switch the curly brackets for parentheses, the error correctly disappears: