Last active
May 17, 2017 22:45
-
-
Save prozacchiwawa/672ffcde2d511749e7fd0699fb7c5445 to your computer and use it in GitHub Desktop.
React attribute is incorrectly unwrapped
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "../node_modules/fable-core/Fable.Core.dll" | |
#r "../node_modules/fable-powerpack/Fable.PowerPack.dll" | |
#r "../node_modules/fable-react/Fable.React.dll" | |
#r "../node_modules/fable-elmish/Fable.Elmish.dll" | |
#r "../node_modules/fable-elmish-react/Fable.Elmish.React.dll" | |
open Elmish | |
open Elmish.React | |
module R = Fable.Helpers.React | |
open Fable.Helpers.React.Props | |
let init _ = (0, Cmd.none) | |
let update msg model = (model, Cmd.none) | |
let view model dispatch = | |
R.li (List.concat [[];[ClassName "fa fa-hourglass"]]) [] | |
let _ = | |
Program.mkProgram init update view | |
|> Program.withReact "test" | |
|> Program.run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ProgramModule, CmdModule } from "fable-elmish/elmish"; | |
import { createElement } from "react"; | |
import { ofArray, concat } from "fable-core/List"; | |
import { withReact } from "fable-elmish-react/react"; | |
export function init(_arg1) { | |
return [0, CmdModule.none()]; | |
} | |
export function update(msg, model) { | |
return [model, CmdModule.none()]; | |
} | |
export function view(model, dispatch) { | |
return createElement("li", concat(ofArray([{}, { | |
className: "fa fa-hourglass" | |
}]))); | |
} | |
ProgramModule.run(withReact("test", ProgramModule.mkProgram(function () { | |
return init(null); | |
}, function (msg) { | |
return function (model) { | |
return update(msg, model); | |
}; | |
}, function (model_1) { | |
return function (dispatch) { | |
return view(model_1, dispatch); | |
}; | |
}))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment