How to avoid extra wrapping
in React?

前端 未结 10 1038
孤独总比滥情好
孤独总比滥情好 2020-12-02 12:04

Today I have started learning ReactJS and after an hour faced with the problem.. I want to insert a component which has two rows inside a div on the page.A simplified exampl

10条回答
  •  半阙折子戏
    2020-12-02 12:31

    You won't be able to get rid of that div element. React.render() needs to return one valid DOM node.

提交回复
热议问题