Diskusi irfan Amaludin
Selesai
![irfan Amaludin](https://cdn-cdpl.sgp1.digitaloceanspaces.com/avatar/4Tlmclb6w.png)
irfan Amaludin
2 tahun yang lalu
Routing sederhana
https://i.postimg.cc/4dhd7gHH/code.png
react.development.js:209 Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
- You might have mismatching versions of React and the renderer (such as React DOM)
- You might be breaking the Rules of Hooks
- You might have more than one copy of React in the same app See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem. printWarning @ react.development.js:209 error @ react.development.js:183 resolveDispatcher @ react.development.js:1592 useRef @ react.development.js:1629 BrowserRouter @ index.tsx:292 renderWithHooks @ react-dom.development.js:16305 mountIndeterminateComponent @ react-dom.development.js:20074 beginWork @ react-dom.development.js:21587 beginWork$1 @ react-dom.development.js:27426 performUnitOfWork @ react-dom.development.js:26557 workLoopSync @ react-dom.development.js:26466 renderRootSync @ react-dom.development.js:26434 performConcurrentWorkOnRoot @ react-dom.development.js:25738 workLoop @ scheduler.development.js:266 flushWork @ scheduler.development.js:239 performWorkUntilDeadline @ scheduler.development.js:533 react.development.js:209 Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
- You might have mismatching versions of React and the renderer (such as React DOM)
- You might be breaking the Rules of Hooks
- You might have more than one copy of React in the same app See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
3 Jawaban
![Avatar](https://cdn-cdpl.sgp1.digitaloceanspaces.com/avatar/zNX6A2_0E.png)
BroKoding
2 tahun yang lalu
Halo kak, coba jalankan command npm link <path>/node_modules/react
Contoh : npm link ../myapp/node_modules/react
![Avatar](https://image.web.id/images/IMG_20230630_225207.md.jpg)
Faisal Hanafi
2 tahun yang lalu
Hallo kak
Apa sudah solved case yang kakak ajukan jika belum solved silahkan reply atau kakak bisa buka diskusi baru apabila kakak merasa sudah solved silahkan klikmark as done :)
![Avatar](https://cdn-cdpl.sgp1.digitaloceanspaces.com/avatar/VGnVaQHWM.png)
Levianth
2 tahun yang lalu
Hi kak~!
Terima kasih telah bertanya di codepolitan dan dengan senang hati kami akan selalu membantu kakak untuk setiap masalah yang kakak alami di setiap courses yang kakak pelajari ya :D
Maka dari itu izinkan saya untuk menutup pertanyaan ini ya kakak dan jika ada pertanyaan lain silahkan tanyakan lagi ya kak :D
Terima kasih~!