ohanhi / elm-native-ui

[CLOSED] Experiment: mobile apps in Elm using React Native.
BSD 3-Clause "New" or "Revised" License
1.54k stars 76 forks source link

Return VTree from main #25

Closed yusefnapora closed 8 years ago

yusefnapora commented 8 years ago

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 :)