Skip to content

feat: wrap the React library#783

Merged
davesnx merged 1 commit into
mainfrom
anmonteiro/wrap
Sep 19, 2023
Merged

feat: wrap the React library#783
davesnx merged 1 commit into
mainfrom
anmonteiro/wrap

Conversation

@anmonteiro

Copy link
Copy Markdown
Member

fixes #770

supersedes #773

Comment thread src/dOM.re
Comment thread src/react0.re
Comment thread src/router.re Outdated
Comment thread src/dOM.re
@@ -0,0 +1,1117 @@
/* First time reading an OCaml/Reason/BuckleScript file? */

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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...

Comment thread src/dOMServer.re
Comment thread src/dune
Comment thread src/testRenderer.re
@davesnx davesnx merged commit cd5f4ff into main Sep 19, 2023
@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