Closed zerkms closed 8 years ago
React does initialization based on the environment. So after you require/import React, the environment at that point should never change. We don't handle the changing case and we likely never will.
The suggested way to make use of NODE_ENV is via an environment variable NODE_ENV=production node app.js
. If that's not possible, then ensuring that process.env.NODE_ENV='production'
ASAP in your app, before you require/import.
Cool, thanks.
React v0.13.3
Code to reproduce the problem:
When is run the
Uncaught TypeError: Cannot set property 'props' of undefined
error is thrown with the following callstack:which is invoked from
So as we can see -
this._store
is only defined when it's not inproduction
mode, but it's still being addressed.Am I missing something?