ohanhi / elm-native-ui

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

More StartApp-style API #20

Closed ohanhi closed 8 years ago

ohanhi commented 8 years ago

The exposed API is much cleaner now:

NEW:

port viewTree : Signal Json.Encode.Value
port viewTree =
  NativeApp.start { model = model, view = view, update = update, init = init }

OLD:

port vtreeOutput : Signal Json.Encode.Value
port vtreeOutput =
  Signal.map2 (,) model init
  |> Signal.map fst
  |> Signal.map view
  |> Signal.map RN.encode

Closes #18