-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix: update default props to JS default params #1598
Conversation
🚀 Deployed on https://pr-1598--dhis2-ui.netlify.app |
2d1474b
to
5437911
Compare
Worked with @amcgee and found that the tests that were hanging were ones using Setting the prop default to a stable object reference fixed the loop issue, which was manually noticeable in storybook stories, so we updated other default props to similar stable objects -- running tests now to see if they work 🤞 Update: |
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.
With the update to use stable default prop references this looks good to me!
great find! thanks @amcgee @KaiVandivier |
## [9.11.5](v9.11.4...v9.11.5) (2024-09-26) ### Bug Fixes * update default props to JS default params ([#1598](#1598)) ([20e343f](20e343f))
Implements LIBS-682
As we move to React 18 in platform as part ofhttps://github.com/dhis2/app-platform/pull/876, all our components and apps need to stop using defaultProps as these were deprecated and started generating a warning since React 18.3.
Most of this transformation was done using a codemod - the codemod is a bit brittle and tied to this project for now, but can be made more generic and incorporated in
d2 migrate
as we test it in more projects.