You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks @fkling! Closing this out in favor of #1851. Also, see #3236 (comment) which has a somewhat related discussion.
@colllin For future reference, usage questions are best addressed on StackOverflow. I know this was somewhat bug like, so this wasn't a bad place, but just something to consider; we try to keep github for tracking bugs in the core.
I'm happy to move this question elsewhere if you can point me in the right direction.
Why do I get an error (
Uncaught TypeError: Cannot read property 'someProperty' of null
) when I don't callthis.setState()
before the initial render?This error goes away if I simply call
this.setState()
with an empty object incomponentWillMount
:Isn't
this.state
part of the core React Component API? Why wouldn't it be present by default?The text was updated successfully, but these errors were encountered: