John O'Reilly
08/09/2020, 9:33 AMkotlin-react-router-dom
wrapper ....it looks like correct property gets passed to StationList
but useEffectWithCleanup
block isn't being executed 2nd time I click on a link (so isn't loading the data)....anyone know what I should be doing differently here?John O'Reilly
08/09/2020, 7:32 PMJohn O'Reilly
08/09/2020, 7:34 PMuseEffectWithCleanup(dependencies = listOf())
if I change to following then it's run the 2nd time
useEffectWithCleanup
turansky
08/10/2020, 11:48 PMnull
- always
• emtyList()
- once
• listOf(x, y)
- when x
or y
changed
https://reactjs.org/docs/hooks-effect.html