Sign in
Log inSign up

Props not loading before Render?

Chris Reeder's photo
Chris Reeder
·Dec 10, 2016

So I've been having this issue where I have an activeUser prop when a user logs in. I use it to display the users information. I persist it with localStorage, and If I navigate around it works just fine, and when I refresh keeps the user info. The issues is when I refresh when I need to use the activeUser prop on the page. The props don't seem to load before it renders the page, and I get an error of undefined.

Been working on this for quite a while, but no love. It seems to be something with the hot reloading but I'm not 100% sure.

Any Help would be awesome!

Chris

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct