Hey there,

indeed there was a typo. Every useAuth was actually a useUser , i just c/p it from an actual project where it was named differently.

The whole point of the example was to see how you would utilise the items defined above (UserProvider , useUser , etc.) so that’s why I skipped the definition of those because I thought it would be obvious that they were referring to all the previous work that was done in this article. Thus the uses of useAuth (which was a typo for useUser) was referring to the module implemented in the previous gist.

Thanks for pointing the typo out, it’s now fixed :)

Front-end ReactJS Developer — https://aggelos.dev

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store