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

feat: wrap the React library #783

Merged
merged 1 commit into from
Sep 19, 2023
Merged

feat: wrap the React library #783

merged 1 commit into from
Sep 19, 2023

Conversation

anmonteiro
Copy link
Member

fixes #770

supersedes #773

src/dOM.re Show resolved Hide resolved
src/react0.re Outdated Show resolved Hide resolved
src/router.re Outdated Show resolved Hide resolved
@@ -0,0 +1,1117 @@
/* First time reading an OCaml/Reason/BuckleScript file? */
Copy link
Member

Choose a reason for hiding this comment

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

I would keep ReactDOM as a toplevel, since it matches what react exposes and keep it as a good default, where 1 module from reason-react binds to one exportable from react.js

Copy link
Member Author

Choose a reason for hiding this comment

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

this would need a new library, e.g. react.dom, which I don't think is a good tradeoff.

Copy link
Member

Choose a reason for hiding this comment

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

I kind of like the new library actually (since react.native) can be their own thing also...

src/dOMServer.re Show resolved Hide resolved
src/dune Show resolved Hide resolved
src/testRenderer.re Outdated Show resolved Hide resolved
@davesnx davesnx merged commit cd5f4ff into main Sep 19, 2023
3 checks passed
@davesnx davesnx deleted the anmonteiro/wrap branch September 19, 2023 04:40
davesnx added a commit that referenced this pull request Sep 19, 2023
davesnx pushed a commit that referenced this pull request Sep 19, 2023
anmonteiro added a commit that referenced this pull request Sep 20, 2023
anmonteiro added a commit that referenced this pull request Sep 20, 2023
* feat: wrap the React library (#783)

* use the react use callback fix

---------

Co-authored-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
davesnx added a commit to davesnx/opam-repository that referenced this pull request Feb 10, 2024
CHANGES:

* Wrap the `React` library, exposing just a single top-level module
  (@anmonteiro in [reasonml/reason-react#783](reasonml/reason-react#783))
* Re-organise toplevel modules (@davesnx in [reasonml/reason-react#794](reasonml/reason-react#794))
* Require and adapt to Melange v3 (@anmonteiro in [reasonml/reason-react#821](reasonml/reason-react#821))
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.

Wrap the React Library
3 participants