© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Nicky Tope
Javascript master of none
Sounds like the prop is asynchronous? In that case I would usually put a check in your render method to exit early when this prop is not set then check it in the componentWillReceiveProps lifecycle event.
@topey So I tried putting an if else in there. and use componentWillReceiveProps to update state and but it doesn't seem in be firing.
And I get this.state.user is null when I refresh...