Skip to content

Commit 6193fd4

Browse files
committed
Update README.md
1 parent 09a0455 commit 6193fd4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ Please create [issues](https://github.com/afcastano/elm-nested-component-communi
1414

1515
```Counter.elm``` exposes getValue method to return the value of the counter without knowing the internal structure:
1616

17-
```
17+
```elm
1818
getValue : CounterModel -> Int
1919
getValue model =
2020
model.num
2121
```
2222

2323
```Pair.elm``` exposes a new update function that will receive a new msg and a value:
2424

25-
```
25+
```elm
2626
type ManualUpdateMsg
2727
= Red
2828

@@ -38,7 +38,7 @@ manualUpdate msg value model =
3838

3939
Also, the normal update function returns extra data that includes the value of the counters:
4040

41-
```
41+
```elm
4242
type alias RedVal = Int
4343
type alias GreenVal = Int
4444

@@ -47,7 +47,7 @@ pairUpdate : PairMsg -> CounterPair -> (CounterPair, RedVal, GreenVal)
4747

4848
```Main.elm``` orchestrates the whole thing. Whenever a counter changes, it updates the other counter and the totals without knowing the internal structure of neither of them:
4949

50-
```
50+
```elm
5151
Pair1 sub ->
5252
let
5353
(pair1, redVal, greenVal) = pairUpdate sub model.pair1
@@ -61,7 +61,7 @@ Pair1 sub ->
6161
To run it, simply do:
6262

6363
```
64-
git clone git@bitbucket.org:afcastano/elm-nested-component-communication.git
64+
git clone git@github.com:afcastano/elm-nested-component-communication.git
6565
cd elm-nested-component-communication
6666
elm-reactor
6767
```

0 commit comments

Comments
 (0)