Skip to content

feat: support component's ngOnChanges lifecycle hook #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 20, 2020
Merged

feat: support component's ngOnChanges lifecycle hook #110

merged 1 commit into from
Jun 20, 2020

Conversation

miluoshi
Copy link
Contributor

This PR adds support for ngOnChanges lifecycle hook. render and rerender functions will automatically call ngOnChanges with correct arguments on component instance if defined.
In case of initial render the ngOnChanges is called before ngOnInit - the same behavior as in real Angular runtime.

related issues: #56

Copy link
Member

@timdeschryver timdeschryver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was easier than expected, thanks a lot!
If you want, feel free to add an example I think it could help other devs.

@timdeschryver timdeschryver merged commit de77901 into testing-library:master Jun 20, 2020
@timdeschryver
Copy link
Member

@all-contributors please add @miluoshi for code, tests

@allcontributors
Copy link
Contributor

@timdeschryver

I've put up a pull request to add @miluoshi! 🎉

@timdeschryver
Copy link
Member

🎉 This PR is included in version 9.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants