Open kantuni opened 4 days ago
In 8.1.2, under sections Passing "Named Arguments" and Using classList the navLink function is defined as follows
Passing "Named Arguments"
Using classList
navLink
navLink targetPage { url, caption } = li [ classList [ ( "active", page == targetPage ) ] ] [ a [ href url ] [ text caption ] ]
However, under section Using Debug.log to tell when a function has been run the navLink function has a different implementation.
Using Debug.log to tell when a function has been run
navLink route { url, caption } = li [ classList [ ( "active", isActive { link = route, page = Debug.log "Rendering nav link with" page } ) ] ] [ a [ href url ] [ text caption ] ]
It's using a function that hasn't been defined yet.
It should be
navLink targetPage { url, caption } = li [ classList [ ( "active", Debug.log "Rendering nav link with" page == targetPage ) ] ] [ a [ href url ] [ text caption ] ]
In 8.1.2, under sections
Passing "Named Arguments"
andUsing classList
thenavLink
function is defined as followsHowever, under section
Using Debug.log to tell when a function has been run
thenavLink
function has a different implementation.It's using a function that hasn't been defined yet.
It should be