Hello guys. I tried to use react lifecycles both through Class component and function component but none of them worked.
I’m using @ionic/react version 5.0.0
class component code:
import React from "react";
import {
withIonLifeCycle
} from "@ionic/react";
class NewProduct extends React.Component {
ionViewWillEnter() {
console.log("ionViewWillEnter event fired");
}
render(){
return(<div></div>);
}
}
export default withIonLifeCycle(NewProduct);