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

Use an external for ReactDOMRE.Style.combine and remove Obj.magic #519

Merged
merged 2 commits into from
Apr 27, 2020

Conversation

bloodyowl
Copy link
Contributor

No description provided.

@sgny
Copy link
Contributor

sgny commented Apr 16, 2020

I've been waiting for #437 to be merged for a while, as we already implemented something similar for reason-react-native.

That one uses the same definition for combine, but does not revise unsafeAddProp. There is also an unsafeAddStyle which allows something like

unsafeAddStyle(someStyle, {"someProp1": someValue1, "someProp2": someValue2});

which avoids multiple object copies when there are multiple props to add.

It also allows creating a style as below

unsafeAddStyle(make(), {"someProp1": someValue1, "someProp2": someValue2});

but %identity is always available to convert such objects for use with combine anyway.

@rickyvetter
Copy link
Contributor

Hey do you mind rebasing? This looks great to me.

@rickyvetter rickyvetter merged commit 71343bc into reasonml:master Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants