Production mode
Flag can be passed to ReactState.init method. When production is enabled:
All manipulations with state from
windowobject are not allowedState is disconnected from
windowobjectWarnings are disabled
However if you want to track state manipulations from code you can access them fromStateHistory class
From version process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'prod' check is added to make sure minified bundle is included. If you are using webpack do not forget to add to your production build configuration:
new webpack.DefinePlugin({
"process.env": {
NODE_ENV: JSON.stringify("production")
}
})Last updated
Was this helpful?