[오류] 리액트 React has detected a change in the order of Hooks called by App. This will lead to bugs and errors if not fixed

728x90
반응형

[오류]

React has detected a change in the order of Hooks called by App. This will lead to bugs and errors if not fixed~~

 

[해결]

App.js -> App.jsx로 변경

 

[참고자료]

 

"React has detected a change in the order of Hooks" but Hooks seem to be invoked in order

I am trying to use Context and Reducers via React's hooks, and running into problems with the order of the hooks not being constant. My understanding was that as long as the order of the useHook(…)

stackoverflow.com

 

 

React Top-Level API – React

A JavaScript library for building user interfaces

legacy.reactjs.org

 

반응형