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

React 19 compat #3048

Merged
merged 3 commits into from
Jun 27, 2024
Merged

React 19 compat #3048

merged 3 commits into from
Jun 27, 2024

Conversation

yusukebe
Copy link
Member

No description provided.

usualoma added 3 commits June 12, 2024 12:12
…(document metadata, "form" element and related hooks, and new behavior of hooks) (#2960)

* feat(jsx/dom): Introduce document metadata integration for compatibility with React 19

* test(jsx/dom): add test for "ref as a prop"

* refactor: tweaks element selector

* feat(jsx/dom): implement " Cleanup functions for refs" for compatibility with React 19

* feat(jsx/dom): implement `useDeferredValue()`

* refactor(jsx): insert metadata into head synchronously

* feat(jsx/dom): introduce form and related hooks

* feat(jsx): sort by precedence in documentMetadataTag

* feat(jsx): enable to specify action attribute as function

* fixup! feat(jsx): enable to specify action attribute as function

* refactor: refactor file layout

* feat(jsx): de-dupe tags

* feat(jsx): accept crossOrigin as crossorigin

* feat(jsx/dom): inprement blocking and precedence feature for jsx/dom

* feat(jsx): export new hooks

* fix(jsx/dom): fix some bugs in jsx/dom/hooks

* fix(jsx/dom): fix useOptimistic hook

* fix(jsx/dom): fix signature of useActionState

* fix(jsx): fix type declaration for HtmlEscapedCallback

* refactor(jsx): improve importing of intrinsic element components

* feat(jsx): support permalink for useActionState

* fix(jsx): fix composeRef cleanup in intrinsic element components

* fix(jsx): remove blocking attribute from DOM node

* fix(jsx/dom): preserve HTMLElement for meta data if it will be unmounted

* fix(jsx/dom): fix de-dupe logic in `documentMetadataTag`

* fix(jsx/dom): fix precedence logic in `documentMetadataTag`

* feat(jsx): add React 19 compatibility attributes

* fix(jsx): Handle NodeListOf<HTMLElement> as an iterable

* test: tweaks test data

* fix(jsx/dom): fix precedence logic in `documentMetadataTag`

* fix(jsx/dom): fix meta data tag insertion behavior

* fix(jsx/dom): set next node recursively for all previous nodes

* refactor(jsx/dom): use better variable names and types in form component

* fix(jsx/dom): fix meta data tag insertion behavior

* fix(jsx): improve document meta tag behavior in jsx

* test(jsx/dom): add tests for intrinsic-element/components

* fix(jsx/dom): fix `use()` hook wrong behavior

* test(jsx/dom): add tests for hooks

* test(jsx): add tests new hooks for form

* fix(jsx): update current state synchronously if no actions are provided

* test(jsx): add tests for new hooks for form handling

* docs(jsx): add documentation for hooks

* test(jsx): Update test

* refactor(jsx/hooks): remove unused constant

* feat(jsx): improve compatibility with React 19 (precedence / special behavior)

* feat(jsx/dom): improve compatibility with title element mount/unmount behavior

* feat(jsx): support async function for useTransition

* fix(jsx/dom): method is always 'post' when data is present

* feat(jsx): support formAction for input and button elements

* feat(jsx/dom): support suspense with child counter

* feat(jsx/dom): enable to handle async error in useTransition
Copy link

codecov bot commented Jun 27, 2024

Codecov Report

Attention: Patch coverage is 97.80564% with 21 lines in your changes missing coverage. Please review.

Project coverage is 96.02%. Comparing base (9c21cc6) to head (a734b35).
Report is 20 commits behind head on next.

Files Patch % Lines
src/jsx/dom/intrinsic-element/components.ts 97.36% 10 Missing ⚠️
src/jsx/intrinsic-element/components.ts 95.93% 7 Missing ⚠️
src/helper/html/index.ts 87.50% 1 Missing ⚠️
src/jsx/context.ts 96.00% 1 Missing ⚠️
src/jsx/dom/render.ts 99.13% 1 Missing ⚠️
src/utils/html.ts 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next    #3048      +/-   ##
==========================================
+ Coverage   94.67%   96.02%   +1.35%     
==========================================
  Files         137      142       +5     
  Lines       13400    14273     +873     
  Branches     2367     2474     +107     
==========================================
+ Hits        12686    13706    +1020     
+ Misses        714      567     -147     

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

@yusukebe yusukebe merged commit 4201a29 into next Jun 27, 2024
14 checks passed
@yusukebe yusukebe deleted the react-19-compat branch June 27, 2024 01:37
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.

2 participants