jlengstorf / gatsby-intermediate

https://frontendmasters.com/courses/intermediate-gatsby/
MIT License
54 stars 48 forks source link

Breaking when upgrading react version #6

Closed cjenaro closed 4 years ago

cjenaro commented 4 years ago

I was going along the project and everything worked fine until (I believe) the schema customization commit, there I started getting a hooks error whenever I started the project, I compared the code on the repo with mine and the only difference was in the versions, so my first attempt was to downgrade the react and react-dom versions on the theme-dev site and it started working again, so, on the course versions 16.10.2 were used, when I installed react I got versions 16.2.0, guess something breaks at that point?

jlengstorf commented 4 years ago

hey there!

if you run yarn outdated, are all the versions of React updated? if there are mismatched versions of React in themes that can cause issues

I just ran yarn upgrade-interactive to bump React and was able to run yarn workspace theme-dev develop without any hooks errors

let me know if you're still seeing it! please link to your repo, too, so I can pull it down and see what's going on

thanks!

cjenaro commented 4 years ago

Thank you @jlengstorf you were right, probably mismatched versions between the yarn workspaces

carlaiau commented 4 years ago

Thanks @jenaro94 for highlighting the issue, and @jlengstorf for a fantastic course and remedy to this small issue. Yarn workspaces are awesome :popcorn: