Skip to content

Conversation

@davesnx
Copy link
Member

@davesnx davesnx commented Jul 16, 2024

This PR adds some of the new functions on React 19.

* 'main' of github.com:/reasonml/reason-react:
  fix: type of pipeable stream to allow objects with keys (#854)
  reason-react-ppx: + lower bound in ocaml
  add missing entries to changelog
  Fix multi-child fragment (#852)
  update compiler version in makefile cmd (#851)
  Add locations-check test (#844)
  fix: re-enable failing tests + fix location tests (#850)
  test: repro #840 (#842)
  Add CSS Box Alignment Module Level 3 (#847)
davesnx and others added 2 commits November 20, 2024 14:19
Co-authored-by: Javier Chávarri <[email protected]>
Co-authored-by: Javier Chávarri <[email protected]>

/* https://react.dev/reference/react/useOptimistic */
[@mel.module "react"]
external useOptimistic:
Copy link
Member

Choose a reason for hiding this comment

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

can we @mel.uncurry some of these callbacks?

Copy link
Member Author

Choose a reason for hiding this comment

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

Since I don't want to push code to this branch directly, done here: #867

/* https://react.dev/reference/react/useActionState */
[@mel.module "react"]
external useActionState:
(('state, FormData.t) => unit, 'state, ~permalink: bool=?) =>
Copy link
Member

Choose a reason for hiding this comment

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

should we add a unit argument at the end?

Copy link
Member Author

Choose a reason for hiding this comment

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

Since I don't want to push code to this branch directly, done here: #867

@anmonteiro
Copy link
Member

@davesnx this is a big PR and there are some big changes. do you have a plan in your head or a link to something you've written about how to land these effectively in reason-react?

more specifically about this PR, how do you want to move forward and what's missing?

@davesnx
Copy link
Member Author

davesnx commented Nov 25, 2024

I was planning on using the branch "19" as a release candidate branch for all PRs depending on it, test it different repos (ahrefs included) and, if everything is good then do the opam release

* '19' of github.com:/reasonml/reason-react:
  Update src/React.re
  Update src/React.re
  Update src/React.re
* Install melange-testing-library

* Install melange-testing-library npm deps

* Vendor melange-testing-library

* Fix Form__test with RTL

* Start migrating Hooks__test

* Remove dependency

* Remove unused code from Form__test

* Add a jest-devtoolsgs

* Add a jest-devtools

* Migrate Hooks and Form into RTL

* Add demo to manually test easily

* Use Uncurried for tests

* Migrate all React__test

* Force install since we are dealing with R19

* Snapshot with lower {}

* Remove jest from demo/dune

* Add comment on install --force

* Bind React.act and React.actAsync

* Bind React.act and React.actAsync

* Use React.act as async version only

* Test react.act and react.actasync

* Fix hola test :(
* Install melange-testing-library

* Install melange-testing-library npm deps

* Vendor melange-testing-library

* Fix Form__test with RTL

* Start migrating Hooks__test

* Remove dependency

* Remove unused code from Form__test

* Add a jest-devtoolsgs

* Add a jest-devtools

* Migrate Hooks and Form into RTL

* Add demo to manually test easily

* Use Uncurried for tests

* Migrate all React__test

* Force install since we are dealing with R19

* Snapshot with lower {}

* Enable ref in ppx

* Add jest test for ref

* Remove jest from demo/dune

* Add comment on install --force

* Improve test from checking ref

* Bind React.act and React.actAsync

* Bind React.act and React.actAsync
@davesnx davesnx changed the title Support for React 19 new APIs Support for React 19 Nov 25, 2024
* 'main' of github.com:/reasonml/reason-react:
  Remove raise annotations and fix locations on errors (#863)
  ppx: support "custom children" in uppercase components without having to wrap in array literal (#823)
* '19' of github.com:/reasonml/reason-react:
  Enable ref as valid prop (#862)
  Replace react dom's testing library with ReactTestingLibrary (#859)
* 'main' of github.com:/reasonml/reason-react:
  test: update snapshot tests to melange v5 (#875)
  nix: remove nix-filter dependency (#874)
  chore(nix): remove flake-utils (#873)
  Get rid of .t from linguist (#868)
@davesnx davesnx marked this pull request as ready for review February 24, 2025 17:36
* 'main' of github.com:/reasonml/reason-react:
  Install melange.5.0.0-52 in CI (#882)
  Update deps (#876)
  update setup-ocaml to v3 (#878)
@davesnx
Copy link
Member Author

davesnx commented Feb 26, 2025

This PR is waiting to be merged for a release from react.js @ 19.1.0 with the fix required to work, currently pointed at [email protected]

davesnx added 2 commits April 3, 2025 12:17
* 'main' of github.com:/reasonml/reason-react:
  Documentation updates for 0.16 (#864)
@davesnx
Copy link
Member Author

davesnx commented Apr 3, 2025

React 19, here we go!

@davesnx davesnx merged commit 5ff3bf7 into main Apr 3, 2025
3 checks passed
davesnx added a commit to davesnx/opam-repository that referenced this pull request Jul 22, 2025
CHANGES:

* FEATURE: add color to domProps (@tatchi in reasonml/reason-react#871)
* BREAKING: Support for React 19 (@davesnx in reasonml/reason-react#846)
* DOCS: Documentation updates for 0.16 (@davesnx in reasonml/reason-react#864)
* INFRA: Update deps (@johnhaley81 in reasonml/reason-react#876)
* INFRA: update setup-ocaml to v3 (@anmonteiro in reasonml/reason-react#878)
* FIX: Remove raise annotations and fix locations on errors (@davesnx reasonml/reason-react#863)
* FIX: type of pipeable stream to allow objects with keys (@anmonteiro in reasonml/reason-react#854)
* FEATURE: Add `preconnect`, `prefetchDNS`, `preinit`, `preinitModule`, `preload` and `preloadModule` in ReactDOM.Experimental (@r17x in reasonml/reason-react#849)
* BREAKING: Make lowerbound be Melange 5.1 (due to Js.FormData.t usage)
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.

5 participants