AnomalyInnovations / serverless-stack-demo-client

Source for the demo app client in the Serverless Stack Guide
https://demo2.serverless-stack.com
MIT License
635 stars 204 forks source link

childProps is undefined #18

Closed arkmoon closed 6 years ago

arkmoon commented 6 years ago

When passing childProps from App.js like this: <Routes props={childProps} />

Routes.js is receiving a variable called "props" that contains the contents of "childProps" but a variable "childProps" isn't actually defined in Routes.js. I kept getting this error until I changed the variable name:

TypeError: _this.props.userHasAuthenticated is not a function

when trying to log in.

arkmoon commented 6 years ago

Nevermind, I see in a later step, you change the code to say: <Routes childProps={childProps} />

This is confusing for people following the tutorial. You may want to revise the line on this page:

https://serverless-stack.com/chapters/add-the-session-to-the-state.html

jayair commented 6 years ago

@arkmoon Yeah that line should say childProps. I just made an edit to that section and added that typo.