React.js without JSX - “Warning: Something is calling a React component directly. Use a factory or JSX instead”

后端 未结 2 770
长发绾君心
长发绾君心 2021-02-02 15:59

I\'m trying to use React.js component without JSX and receive such warning:

Warning: Something is calling a React component directly. Use a factory or JSX instead.

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-02 17:01

    You need to wrap all of your child components in createFactory as well, I was able to get your code to run without that specific warning by wrapping Tag and Input in createFactory.

    jsbin

提交回复
热议问题