Releases: welldone-software/why-did-you-render
v10.0.1
Why Did You Render v10 Supporting React 19! 🎉🍾
¯\(ツ)/¯ The version was bumped from v8 to v10 directly and 10.0.0 is actually the same as the next 10.0.1. Sorry, I had some npm
publishing issues ¯\(ツ)/¯
Note
I've joined the React team, specifically working on React tooling. This role has opened up exciting opportunities to enhance the developer experience for React users— and your input could offer valuable insights to help me with this effort. Please join the conversation in the discussion thread!
Breaking Changes
- 45fcdcf, 7b6fc5c, 0b3cdd9, 7eed9c5 - Now supports React 19 🎉🍾
- Older versions are not supported, however I've created version branches with specific readme for older versions and added that information to the main readme:
- 0613270 - Advanced settings and exposed internals changes:
- Custom
notifier
callback props were renamed fromprevHook
andnextHook
toprevHookResult
andnextHookResult
- For advanced use-cases-
wdyrStore.hooksPerRender
was renamed towdyrStore.hooksInfoForCurrentRender
- Custom
Caution
The library was not tested with React Compiler at all. I believe it's completely incompatible with it.
Caution
Not all re-renders are "bad". Sometimes shenanigan to reduce re-renders can either hurt your App's performance or have a neglagable effect, in which case it would be just a waste of your efforts, and complicate your code. Try to focus on heavier components when optimizing and use the React DevTools Profiler to measure the effects of any changes.
New Features
- 1562bfc - Improved console colors so the text is now clearly visible in dark mode. This can be adjusted via the setting
textBackgroundColor
.
Internal
- cdd84dc, 2eb3f93, 6c617d6 - Re-worked how owner render reasons are detected
- 6bd8f0c - Fixed how the demo app is being ran and using
fast-refresh
instead of the oldhot-reload
- 0613270 - Made the detection of hooks in a new component much more simple, clear, and accurate
- 8cb3d36, 5e927f2 - Adjusted tests to React 19
- cd969a0 - Only testing the latest libraries that are compatible with
React 19
. - 7eed9c5 - Eliminated a warning that
forwardRef
functions accept exactly two parameters. Added a demo page forforwardRef
. - db2914c - Updated eslint to version 9
- 3fb801c - Removed all dev packages that were not used
- fcc8a8f, 1f524c0 - Updated the rest of the dev packages, and adjusted the code accordingly
Minor update
- Updated all packages, besides eslint (8->9) because it was a pretty big update. I might do it later.
- Fix #286 - set defaultProps to undefined when it's not present in the original to not have the warning "Support for defaultProps will be removed from function components in a future major release" by @Hypnosphi. Thank you!
- Readme updates by myself @vzaidman and @sergeylaptev. Thank you!
v8.0.1
Breaking changes
- Now only support
React 18
since it differs quite a lot from previous versions when monkey patching. by @vzaidman- For older versions use @^7
- Renamed the internal property that checks if React is monkey patched from
React.isWDYR
toReact.__IS_WDYR__
by @vzaidman
Non-breaking changes
- Add support for
useSyncExternalStore
by @iamakulov in #283 - Updated all packages to latest versions and adjusted tests, builds and dev server
- no more
yarn audit
vulnerabilities by @vzaidman
- no more
Docs updates
- Smaller logo in README.md by @alex-page in #248
- Add an example for using named imports with trackExtraHooks by @xepozz in #245
- fix simple typos by @lpmi-13 in #282
- Fix sentence by @busybox11 in #275
New Contributors
- @alex-page made their first contribution in #248
- @xepozz made their first contribution in #245
- @iamakulov made their first contribution in #283
- @lpmi-13 made their first contribution in #282
- @busybox11 made their first contribution in #275
v8.0.0
v7.0.1
- fixed the reference to React 18 in
peerDependencies
inpackage.json
. Thank you @jussikinnula!
React 18
- Added support to React 18! Thank you @jussikinnula!
- Upgraded all packages
- Improved race conditions in E2E tests that caused them to fail in the latest Chrome versions
- It also made the tests clearer and faster
maintenance
- Update all packages
- Fixed tests for new versions
- Fixed eslint for new versions
- Added some TS types. Thank you @bduff9.
- Improved the readme