Skip to content

Commit 4eb5407

Browse files
committed
Small fixes
1 parent 8d01993 commit 4eb5407

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

docs/recipes/ui/routing-with-elmish.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# How do I create multi-page applications with routing and the useElmish hook?
22

3-
*Written for SAFE template version 4.2.0*
4-
53
[UseElmish](https://zaid-ajaj.github.io/Feliz/#/Hooks/UseElmish) is a powerful package that allows you to write standalone components using Elmish. A component built around the `UseElmish` hook has its own view, state and update function.
64

75
In this recipe we add routing to a safe app, and implement the todo list page using the `UseElmish` hook.
@@ -234,7 +232,7 @@ let pageContent model =
234232
In the `view` function, replace the call to `todoList` with a call to `pageContent`
235233

236234
=== "Code"
237-
```
235+
```fsharp title="Index.fs"
238236
let view model dispatch =
239237
Html.section [
240238
...
@@ -243,15 +241,15 @@ In the `view` function, replace the call to `todoList` with a call to `pageConte
243241
]
244242
```
245243
=== "Diff"
246-
```
244+
```diff title="Index.fs"
247245
let view model dispatch =
248246
Html.section [
249247
...
250248
- todoList view model
251249
+ pageContent model
252250
...
253251
]
254-
```
252+
```
255253

256254
## 9. Add the router to the view
257255

0 commit comments

Comments
 (0)