【React】Invalid hook call. Hooks can only be called inside of the body of a function component.

it2026-06-10  0

 具体报错信息:

解决办法:

cnpm install --save react@^16.12.0 react-dom@^16.12.0

   最好在执行完以上命令后,重新执行一下npm start.

最新回复(0)