Skip to content

Commit

Permalink
corrected TextInputMsg to InputTextMsg
Browse files Browse the repository at this point in the history
  • Loading branch information
sumeetdas authored Nov 1, 2021
1 parent c9ddeea commit efad329
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chapters/scaling/splitting-programs.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ let render (state: State) (dispatch: Msg -> unit) =
dispatch (Msg.CounterMsg counterMsg)
let inputTextDispatch (inputTextMsg: InputTextMsg) : unit =
dispatch (Msg.TextInputMsg inputTextMsg)
dispatch (Msg.InputTextMsg inputTextMsg)
match state.CurrentPage with
| Page.Counter ->
Expand Down Expand Up @@ -264,7 +264,7 @@ let counterDispatch (counterMsg: CounterMsg) : unit =
dispatch (Msg.CounterMsg counterMsg)
let inputTextDispatch (inputTextMsg: InputTextMsg) : unit =
dispatch (Msg.TextInputMsg inputTextMsg)
dispatch (Msg.InputTextMsg inputTextMsg)
```
Here they are again. As you can see, these functions do nothing special, they only wrap their input messages (for the child programs) into a message type of the parent program, namely from the cases `Msg.CounterMsg` and `Msg.InputTextMsg` which the original `dispatch` function understands since it takes `Msg` as input.

Expand Down

0 comments on commit efad329

Please sign in to comment.