This is a very important measure of effectiveness in React in general (and not only react-router).
React DOM props state.
, React documentation for Advanced Performance.
: . .
. webpack.config.js , NODE_ENV React.
...
plugins: [
new CommonsChunkPlugin('bundle.js'),
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify(process.env.NODE_ENV)
}
})
]
...
, NODE_ENV=production webpack -p.
, / propTypes .
DOM
. ( ) props state, , .
, . , state prop.
shouldComponentUpdate: function(nextProps, nextState) {
return true;
}
, React , .