cannot appear as a descendant of

前端 未结 11 508
执念已碎
执念已碎 2021-01-30 04:36

I\'m seeing this. It\'s not a mystery what it is complaining about:

Warning: validateDOMnesting(...): 
cannot appear as a descendant of

. See

11条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-30 05:26

    The warning appears only because the demo code has:

    function TabPanel(props) {
      const { children, value, index, ...other } = props;
    
      return (
        
      );
    }
    

    Changing it like this takes care of it:

    function TabPanel(props) {
        const {children, value, index, classes, ...other} = props;
    
        return (
            
        );
    }
    

提交回复
热议问题