What should I add in the JSDoc @param block in the example below for my IntelliJ Webstorm IDE to stop throwing the error: Argument Type ComponentClass<undefined>
is not assignable to parameter type ??? ... `?
/**
* Renders the passed component into a div
* @param { ??? } component // Question: <<<
*/
const myRenderFunc = (component) => (
<div>{component}</div>
)
Your React component @param
type should be {ReactElement}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With