create-react-library
create-react-library copied to clipboard
No support for High order components
trafficstars
I am writing a React package which is an HOC:
const HOC = () => {
return class extends Component {
constructor(props) {
super(props)
this.state = {test: false}
}
componentDidMount = async () => {
this.setState({test: true}) // this line throws an error when it is not supposed to
}
// more stuff
}
}
The above works fine on a create-react-app project but not on create-react-library