File tree Expand file tree Collapse file tree 7 files changed +8597
-17
lines changed
Expand file tree Collapse file tree 7 files changed +8597
-17
lines changed Original file line number Diff line number Diff line change 99output /
1010.fake /
1111temp /
12+ .idea /
Original file line number Diff line number Diff line change 1212 "bulma" : " ^0.7.4" ,
1313 "bulma-pageloader" : " ^2.1.0" ,
1414 "lowdb" : " ^1.0.0" ,
15- "marked" : " ^0.6.1 " ,
15+ "marked" : " ^0.6.2 " ,
1616 "react" : " ^16.8.5" ,
1717 "react-dom" : " ^16.8.5" ,
1818 "showdown" : " ^1.9.0"
2424 "copy-webpack-plugin" : " ^5.0.2" ,
2525 "core-js" : " ^3.0.0" ,
2626 "css-loader" : " ^2.1.1" ,
27- "fable-compiler" : " ^2.2.0 " ,
27+ "fable-compiler" : " ^2.3.0-beta-001 " ,
2828 "fable-loader" : " ^2.1.5" ,
2929 "file-loader" : " ^3.0.1" ,
3030 "html-webpack-plugin" : " ^3.2.0" ,
Original file line number Diff line number Diff line change 1818 Fable.Browser.Event (>= 1.0.0-alpha-001)
1919 Fable.Core (>= 2.1.0-alpha-002)
2020 FSharp.Core (>= 4.5.2)
21- Fable.Core (3.0.0-beta-005 )
21+ Fable.Core (3.0.0-beta-006 )
2222 FSharp.Core (>= 4.5.2)
2323 Fable.Elmish (3.0.0-beta-7)
2424 Fable.Core (>= 3.0.0-beta-004)
5353 Fable.Promise (2.0.0-beta-001)
5454 Fable.Core (>= 3.0.0-beta-002)
5555 FSharp.Core (>= 4.5.2)
56- Fable.React (5.0.0-beta-001 )
56+ Fable.React (5.0.0-beta-007 )
5757 Fable.Browser.Dom (>= 1.0.0-alpha-004)
58+ Fable.Core (>= 3.0.0-beta-006)
5859 FSharp.Core (>= 4.5.2)
5960 FSharp.Core (4.6.2) - redirects: force
6061 Fulma (2.0.0-beta-003)
Original file line number Diff line number Diff line change 11module Question.Dispatcher.View
22
3+ open Fable.React
34open Types
45
6+ let QuestionShow =
7+ LazyComponent.FromExternalFunction(
8+ Question.Show.View.root,
9+ div [] [ str " Loading..." ])
10+
511let root user model dispatch =
612 match model with
713 | { CurrentPage = Router.QuestionPage.Index
814 IndexModel = Some extractedModel } -> Question.Index.View.root extractedModel ( IndexMsg >> dispatch)
915
1016 | { CurrentPage = Router.QuestionPage.Show _
11- ShowModel = Some extractedModel } -> Question.Show.View.root user extractedModel ( ShowMsg >> dispatch)
17+ ShowModel = Some extractedModel } ->
18+ QuestionShow {| user = user
19+ model = extractedModel
20+ dispatch = ShowMsg >> dispatch |}
1221
1322 | { CurrentPage = Router.QuestionPage.Create
1423 CreateModel = Some extractedModel } -> Question.Create.View.root user extractedModel ( CreateMsg >> dispatch)
Original file line number Diff line number Diff line change @@ -77,10 +77,12 @@ let private pageContent user question model dispatch =
7777 questionsView question model.Answers dispatch
7878 replyView user model dispatch ]
7979
80- let root user model dispatch =
81- match model.Question with
80+ let root ( props : {| user: User
81+ model: Model
82+ dispatch: Msg -> unit |}) =
83+ match props.model.Question with
8284 | Some question ->
83- pageContent user question model dispatch, false
85+ pageContent props. user question props. model props. dispatch, false
8486 | None -> div [ ] [ ], true
8587 |> ( fun ( pageContent , isLoading ) ->
8688 Container.container [ ]
Original file line number Diff line number Diff line change @@ -68,16 +68,8 @@ module.exports = {
6868 mode : isProduction ? "production" : "development" ,
6969 devtool : isProduction ? "source-map" : "eval-source-map" ,
7070 optimization : {
71- // Split the code coming from npm packages into a different file.
72- // 3rd party dependencies change less often, let the browser cache them.
7371 splitChunks : {
74- cacheGroups : {
75- commons : {
76- test : / n o d e _ m o d u l e s / ,
77- name : "vendors" ,
78- chunks : "all"
79- }
80- }
72+ chunks : "all"
8173 } ,
8274 } ,
8375 // Besides the HtmlPlugin, we use the following plugins:
You can’t perform that action at this time.
0 commit comments