Closed marawan-nwh closed 6 years ago
Hmm, seems like that createTwoChains()
method is doing something odd:
createTwoChains: function(t) {
var e=this.props.children.props, // this line
n= this.props;
return e[t] && n[t] ? this["fire"+t] : e[t] || n[t];
}
The line I noted above should be written:
var e = Children.only(this.props.children).props,
(also, this might be affected by #415?)
I got the same issue.
By using preact-compat/lib/create-react-class
instead of create-react-class
I could get rid of the error.
alias: {
'create-react-class': 'preact-compat/lib/create-react-class'
}
But after that i got another issue, onClick
just didn't get triggered at all, with no errors in the console.
The create-react-class
module does not work with Preact (and cannot).
I had similar error Cannot read property 'onMouseEnter' of undefined
, adding
alias: {
'create-react-class': 'preact-compat/lib/create-react-class'
}
have helped, tnx
When I switched to preact using aliasing via Webpack, I get the following error:
Here is my webpack.config.js file:
Am I doing something wrong?