-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat(component-testing): breaking: Add React rerender functionality #16038
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, looks good. Merge on CI ✅
I think we should also update the docs repo to include more information about this. I think we should have some pages about the specific CT integrations in the docs repo - just having a README in the npm package directory is not very discoverable.
We should work with the docs team on this.
…ypress into agg23/ReactRerender
…press into tgriesser/chore/improve-ci * 'tgriesser/chore/improve-ci' of github.com:cypress-io/cypress: fix(deps): update dependency systeminformation to version 5.6.4 🌟 (#15819) docs: fix a typo of package name [skip ci] (#15783) chore: deduplicate yarn.lock (#15988) fix(webpack): allow load custom asset on windows (#16099) fix: Properly display unmount as a command (#16041) fix(component-testing): correct imports for relative paths in cypress.json (#16056) Fixed missing SearchInput and improved SpecList scrolling (#16090) docs: update react docs (#16055) chore: Design System Cleanup (#16077) feat(component-testing): breaking: Add React rerender functionality (#16038) fix(component-testing): Increased timeout to allow useEffect to trigger (#16091) chore: release @cypress/webpack-batteries-included-preprocessor-v2.2.1
User facing changelog
Breaking change: Introduces
rerender
functionality in@cypress/react
. This is exposed through the thenable chain frommount
:This is breaking as
mount
previously returned a thenable with the renderedcomponent
, rather than an object.Additional details
React has several mechanisms for internally preserving and updating state between rerenders/remounts. Exposing
rerender
offers a mechanism to take an existing rendered component and update its props in the same way that a parent component changes the props of its children.How has the user experience changed?
rerender
now appears in the CommandLog.PR Tasks
cypress-documentation
?