Build your own SaaS business with SaaS boilerplate. Productive stack: React, Material-UI, Next, MobX, WebSockets, Express, Node, Mongoose, MongoDB. Written with TypeScript.
Following along the tutorial, but when I go to yarn dev first time it calls for it, I get this error when trying to visit the page.
I've created store/index.ts, and user.ts exactly how the tutorial says. I've altered your-settings, and withAuth. Moved updateProfileApiMethod, and gone over everything twice. Can't figure out why it won't render. If the default user is null, shouldn't it be able to render?
TypeError: Cannot read property 'currentUser' of undefined
WithAuth.render
./lib/withAuth.tsx:59
56 |
57 | public render() {
58 | const { store } = this.props;
> 59 | const user = store.currentUser;
| ^ 60 |
61 | if (loginRequired && !logoutRequired && !user) {
62 | return null;
Following along the tutorial, but when I go to yarn dev first time it calls for it, I get this error when trying to visit the page.
I've created store/index.ts, and user.ts exactly how the tutorial says. I've altered your-settings, and withAuth. Moved updateProfileApiMethod, and gone over everything twice. Can't figure out why it won't render. If the default user is null, shouldn't it be able to render?
https://github.com/andrewshrout/saas-book-course/tree/master/book/7-begin