Zaid-Ajaj / Feliz.Router

A router component for React and Elmish that is focused, powerful and extremely easy to use.
MIT License
78 stars 16 forks source link

Update readme on useState #49

Closed MMagueta closed 2 years ago

MMagueta commented 2 years ago

Problem

I noticed that in the docs the useState is as follows

let (currentUrl, updateUrl) = Feliz.React.useState(Feliz.Router.Router.currentUrl())

However there is a type mismatch with the useState, since it requires a unit -> 'T, resulting in

let (currentUrl, updateUrl) = Feliz.React.useState(Feliz.Router.Router.currentUrl)

Pictures

Screenshot from 2021-09-25 21-11-51 Screenshot from 2021-09-25 21-14-02 Screenshot from 2021-09-25 21-14-28