React isValidElement comes out as false

前端 未结 3 1902
我寻月下人不归
我寻月下人不归 2021-02-15 22:28

Here is a simple example:

const Foo = () => {
    return (
    
foo
); } class Bar extends React.Component { render() { retur
3条回答
  •  不知归路
    2021-02-15 23:19

    const Foo = () => 
    foo
    ; class Bar extends React.Component { render() { return (
    bar
    ) } } console.log(React.isValidElement()); console.log(React.isValidElement());

提交回复
热议问题