This commit is contained in:
21
node_modules/react-router/modules/Lifecycle.js
generated
vendored
Normal file
21
node_modules/react-router/modules/Lifecycle.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user