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

refactor: require react, react-dom within OCaml #96

Merged
merged 9 commits into from
Dec 30, 2021

Conversation

zbaylin
Copy link
Contributor

@zbaylin zbaylin commented Dec 29, 2021

This removes the need to set React globally using a file similar to examples/src/react-requires.js.

Rather than gen_js_api referring to a global named React/ReactDOM, we import the libraries once using require and partially apply js.calls

Thanks @jchavarri for the help with this!

Copy link
Collaborator

@jchavarri jchavarri left a comment

Choose a reason for hiding this comment

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

Looks awesome! thanks a lot for working on this.

I think once the ci issue is fixed, this would be good to merge imo.

README.md Show resolved Hide resolved
lib/core.mli Outdated Show resolved Hide resolved
ppx/ppx.ml Outdated Show resolved Hide resolved
@jchavarri jchavarri requested a review from davesnx December 29, 2021 18:18
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@jchavarri
Copy link
Collaborator

Thanks again @zbaylin for working on this! 🎸 Merging

@jchavarri jchavarri merged commit 68359e5 into ml-in-barcelona:main Dec 30, 2021
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.

3 participants