Skip to content

docs: be more specific about current Angular's rerender behavior #1213

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

Conversation

shaman-apprentice
Copy link
Contributor

ref #653

@netlify
Copy link

netlify bot commented Feb 5, 2023

Deploy Preview for testing-library ready!

Name Link
🔨 Latest commit 581248f
🔍 Latest deploy log https://app.netlify.com/sites/testing-library/deploys/63e3f30def86db000876571c
😎 Deploy Preview https://deploy-preview-1213--testing-library.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@@ -411,8 +411,8 @@ expect(screen.getByTestId('name-value').textContent).toBe('Sarah')

### `rerender`

Re-render the same component with different props. Input properties that are not
defined are cleared. This calls `detectChanges` after the props are updated.
Create and render a new instance of the component.
Copy link
Member

@timdeschryver timdeschryver Feb 7, 2023

Choose a reason for hiding this comment

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

I would like to keep a note about "Input properties that are not
defined are cleared.".

Now that I see this, this is also the reason that change and rerender exist.
With change you can't clear input properties.

Context: testing-library/angular-testing-library#252

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated the PR. Please let me know what you think. I also created testing-library/angular-testing-library#365 for further discussion. Thanks again for your great fast responses :)

@timdeschryver
Copy link
Member

@all-contributors please add @shaman-apprentice for docs

@allcontributors
Copy link
Contributor

@timdeschryver

I've put up a pull request to add @shaman-apprentice! 🎉

@timdeschryver timdeschryver merged commit 4cc35c4 into testing-library:main Feb 9, 2023
@shaman-apprentice shaman-apprentice deleted the docs/653/angular-rerender branch February 10, 2023 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants