Skip to content
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

enhance: Use React 19 rc1 #3279

Merged
merged 1 commit into from
Nov 24, 2024
Merged

enhance: Use React 19 rc1 #3279

merged 1 commit into from
Nov 24, 2024

Conversation

ntucker
Copy link
Collaborator

@ntucker ntucker commented Nov 18, 2024

Motivation

Prepare for React 19 release. Ensure we maintain compatibility across React versions.

Solution

  • Switch to React 19 rc1 for default install
  • Add matrix for 17, 18, current to test react versions
  • Test everything and do coverage for React 18 (react native does not support 19)
    • For 17 and 19, test only react libraries and supported platforms
  • Testing library:
    • Library detect is >=18 rather than =18
    • support multiple @testing-library/react versions by falling back for RenderHookOptions type
  • Library compatibility:
    • useRef() needs value
    • React.ReducerAction doesn't exist
    • no defaultProps

Copy link

changeset-bot bot commented Nov 18, 2024

🦋 Changeset detected

Latest commit: 5fd850c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@data-client/use-enhanced-reducer Patch
@data-client/react Patch
@data-client/test Patch
@data-client/ssr Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: 5fd850c Previous: 99cd041 Ratio
normalizeLong 525 ops/sec (±0.37%) 505 ops/sec (±0.19%) 0.96
infer All 9034 ops/sec (±0.53%) 9162 ops/sec (±0.52%) 1.01
denormalizeLong 272 ops/sec (±2.22%) 258 ops/sec (±3.28%) 0.95
denormalizeLong donotcache 880 ops/sec (±0.40%) 904 ops/sec (±0.26%) 1.03
denormalizeShort donotcache 500x 1378 ops/sec (±0.56%) 1326 ops/sec (±0.63%) 0.96
denormalizeShort 500x 777 ops/sec (±2.09%) 773 ops/sec (±1.99%) 0.99
denormalizeShort 500x withCache 4709 ops/sec (±0.17%) 4715 ops/sec (±0.35%) 1.00
denormalizeLong with mixin Entity 250 ops/sec (±2.01%) 247 ops/sec (±1.86%) 0.99
denormalizeLong withCache 7221 ops/sec (±0.24%) 7317 ops/sec (±0.23%) 1.01
denormalizeLong All withCache 6327 ops/sec (±0.24%) 6532 ops/sec (±0.20%) 1.03
denormalizeLong Query-sorted withCache 6289 ops/sec (±0.42%) 6257 ops/sec (±0.97%) 0.99
denormalizeLongAndShort withEntityCacheOnly 1667 ops/sec (±0.57%) 1627 ops/sec (±0.38%) 0.98
getResponse 5968 ops/sec (±0.63%) 6084 ops/sec (±0.59%) 1.02
getResponse (null) 5038228 ops/sec (±0.46%) 5157033 ops/sec (±0.33%) 1.02
getResponse (clear cache) 257 ops/sec (±1.74%) 249 ops/sec (±2.00%) 0.97
getSmallResponse 2747 ops/sec (±0.31%) 2669 ops/sec (±0.28%) 0.97
getSmallInferredResponse 2024 ops/sec (±0.09%) 2056 ops/sec (±0.39%) 1.02
getResponse Query-sorted 6724 ops/sec (±0.49%) 6658 ops/sec (±0.74%) 0.99
getResponse Collection 7036 ops/sec (±1.17%) 6904 ops/sec (±0.94%) 0.98
get Collection 6220 ops/sec (±0.40%) 6059 ops/sec (±0.62%) 0.97
setLong 525 ops/sec (±0.30%) 504 ops/sec (±0.34%) 0.96
setLongWithMerge 205 ops/sec (±0.26%) 202 ops/sec (±0.22%) 0.99
setLongWithSimpleMerge 214 ops/sec (±0.49%) 208 ops/sec (±1.12%) 0.97
setSmallResponse 500x 892 ops/sec (±0.27%) 886 ops/sec (±0.21%) 0.99

This comment was automatically generated by workflow using github-action-benchmark.

@ntucker ntucker force-pushed the react-19 branch 5 times, most recently from fff009c to 203f44d Compare November 24, 2024 16:31
@ntucker ntucker marked this pull request as ready for review November 24, 2024 16:36
@ntucker ntucker force-pushed the react-19 branch 8 times, most recently from c877f87 to f389c96 Compare November 24, 2024 19:26
Copy link

codecov bot commented Nov 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.85%. Comparing base (99cd041) to head (5fd850c).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3279      +/-   ##
==========================================
- Coverage   98.94%   98.85%   -0.09%     
==========================================
  Files         132      132              
  Lines        2281     2279       -2     
  Branches      467      466       -1     
==========================================
- Hits         2257     2253       -4     
  Misses         13       13              
- Partials       11       13       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@ntucker ntucker merged commit 156e3fe into master Nov 24, 2024
27 checks passed
@ntucker ntucker deleted the react-19 branch November 24, 2024 20:01
@github-actions github-actions bot mentioned this pull request Nov 24, 2024
ntucker added a commit that referenced this pull request Nov 24, 2024
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.

1 participant