react-redux-blog
react-redux-blog copied to clipboard
Router.js:130 Uncaught TypeError: _this.setState is not a function
For those who have this issue. it seems that react-router uses create-react-class, which will need to be aliased to the preact-compat version with webpack, browserify or babel, e.g:
// webpack.config.js
module.exports = {
// ...
alias: {
'react': 'preact-compat',
'react-dom': 'preact-compat',
'create-react-class': 'preact-compat/lib/create-react-class'
}
}