Authentication anf Authorization, lesson 7

I am getting this error in lesson 7 storing the user.
Warning: An unhandled error was caught from submitForm(), [TypeError: undefined is not an object (evaluating ‘authContext.setUser’)]

And I can’t login the user because of this error.
Help!

The JS engine is trying to run the .setUser method on AuthContext, but the “user” object is undefined – meaning, usually, nothing is there. You need to go back through your code – check App.js where the user is stored in state, and storage.js which exports the getUser function.

Mosh’s code all works. With an error like this you need to track back through the process of steps in the code. Probably just something typed wrong somewhere – you’ll find it.