'How is a boolean a valid React.ReactNode value?
How is a boolean value (true or false) not an invalid value for a prop of type React.ReactNode, resulting in the following being a Typescript error?
interface IProps {
node: React.ReactNode;
}
const foo: IProps = {
node: false,
};
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
