Closed kabaros closed 1 month ago
🚀 Deployed on https://pr-1598--dhis2-ui.netlify.app
Worked with @amcgee and found that the tests that were hanging were ones using Popper
components, and then discovered that the default modifiers = []
param was creating a new array on each rerender, which triggered a useMemo
recomputation since it's a dependency, which caused a render loop
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: Select
and Popper
tests work for me locally now, but I haven't run the whole test suite... cypress caused a stack overflow when I tried to do that 😞
great find! thanks @amcgee @KaiVandivier
:tada: This PR is included in version 9.11.5 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
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.