Closed B-sirius closed 5 years ago
Hi B-seirius use withHook
import { withAlert } from "react-alert";
...
export default withAlert()(Home)
and invoke it with
this.props.alert.show()
Hi B-seirius use withHook
import { withAlert } from "react-alert"; ... export default withAlert()(Home)
and invoke it with
this.props.alert.show()
that works! thanks for helping
Sorry, for me dont work this.props.alert.show()
Hi, @luizhenriquerosa.
Can you please provide the sandbox with an example?
Here is the example. I wanna use it inside a class component, and get the error "Hooks can only be called inside the body of a function component". I'm not sure if there's a problem with my code or if it's only supporting usage in function component