mobxjs / mobx-react

React bindings for MobX
https://mobx.js.org/react-integration.html
MIT License
4.85k stars 349 forks source link

6.1.3 -> 6.1.4 fails all tests with "Invalid hook call" #809

Closed charliematters closed 4 years ago

charliematters commented 4 years ago

Sorry for the lack of info, but the affected system isn't one I can copy and paste from.

I've upgraded @testing-library/react, @testing-library/dom, @testing-library/jest-dom to their latest version and the tests run fine.

When upgrading from mobx-react@6.1.3 to 6.1.4 every component test fails saying that the render() function is making an invalid hook call.

These tests are all testing components wrapped by observer()

danielkcz commented 4 years ago

Sorry, but without minimal reproduction, we can't really help you. We don't need your whole system, just try to reproduce the issue at hand.

charliematters commented 4 years ago

2 hours later and I've found the problem. Some other dependency was pulling in mobx-react-lite@1.4.1 which was the cause of the error. Sorry!

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or questions.