Created
December 16, 2019 15:37
-
-
Save actarian/2eeb9fe6449e370d43482013aaeacfde to your computer and use it in GitHub Desktop.
RxComp - LifeCycle Hooks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyComponent extends Component { | |
/** | |
* MyComponent instance has been initialized | |
* we can add custom properties to the instance | |
*/ | |
onInit() { | |
// ... | |
} | |
/** | |
* OnPush Strategy update method has been called | |
* we receive changes from parent instance | |
*/ | |
onChanges(changes) { | |
// ... | |
} | |
/** | |
* Current instance template has been parsed | |
* we can handle child html nodes | |
*/ | |
onView() { | |
// ... | |
} | |
/** | |
* MyComponent instance has been destroyed | |
* we can dispose all custom created references | |
*/ | |
onDestroy() { | |
// ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment