reactjs + webpack + babel 7 Syntax error: The rest element has to be the last element when destructing

前端 未结 1 631
孤独总比滥情好
孤独总比滥情好 2020-12-21 11:46

I am doing a dev build and I\'m getting below babel error. I\'m not sure which module/plugin to install for this. Any pointers would be greatly appreciated.

         


        
相关标签:
1条回答
  • 2020-12-21 12:01

    Just like the error message says, move ...props as the last element:

    const DisplayList = ({ children, ...props }) => (...)
    
    0 讨论(0)
提交回复
热议问题