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

Return VTree from main #25

Merged
merged 12 commits into from Mar 16, 2016
Merged

Return VTree from main #25

merged 12 commits into from Mar 16, 2016

Conversation

yusefnapora
Copy link
Contributor

Hey, I figured it would make discussion / review easier if I make a separate PR, rather than continuing to comment on #24

To reacap: this depends on this fork of the elm compiler, which must be on your PATH before the standard elm compiler.

You also need to replace the elm-stuff/packages/elm-lang/core/3.0.0 directory with this fork of elm-core, which adds an Elm.embedReact function to enable rendering for the VTree type. Make sure you checkout the elm-native-ui branch when you clone it, btw.

I went ahead and converted the Native code to ES5 syntax, since it doesn't need any fancy ES6 goodies, and it's nice to have a consistent style. However, it does still use Object.assign, so it's not completely free of ES6 runtime dependencies.

I also tried to generally clean things up a bit and added some comments to ReactNative.elm

Let me know if there's anything else that needs doing :)

The `tagName` will be used to look up a React Component class with the same name,
so e.g. `node "View"` will render a React Native `View` component.
-}
node : String -> List Property -> List VTree -> VTree
Copy link
Owner

Choose a reason for hiding this comment

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

I really like this. This kind of a setup was always the end goal for us. :)

ohanhi added a commit that referenced this pull request Mar 16, 2016
@ohanhi ohanhi merged commit da8500a into ohanhi:master Mar 16, 2016
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.

None yet

3 participants