You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
445 B
22 lines
445 B
import React from "react";
|
|
|
|
class Lifecycle extends React.Component {
|
|
componentDidMount() {
|
|
if (this.props.onMount) this.props.onMount.call(this, this);
|
|
}
|
|
|
|
componentDidUpdate(prevProps) {
|
|
if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps);
|
|
}
|
|
|
|
componentWillUnmount() {
|
|
if (this.props.onUnmount) this.props.onUnmount.call(this, this);
|
|
}
|
|
|
|
render() {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
export default Lifecycle;
|