我尝试在子组件中使用React钩子的setState方法,就在这里传递它: function CompilerOptions({ preset }: CompilerOptionsProps) {</div>} 但是,我得到了一个错误,我刚刚违反了Hooks的规则: Line 33:37: React Hook "useState" cannot be called insideReactHooks must be called
Hooks can only be called inside of the body of a function component.You might have mismatching versions of React and the renderer (such as React DOM)3.我认为样式化组件有问题,因为当我使用没有样式化组件的简单组件时,我的组件</