JordanMarr / fable-lit-fullstack-template

A SAFE-style template with Fable.Lit, Fable.Remoting and Giraffe
MIT License
58 stars 1 forks source link

Reloading pages for cat-facts router shows blank page #3

Closed leolorenzoluis closed 2 years ago

JordanMarr commented 2 years ago

Fixed.

NOTE: Apparently Grapnel router gets confused by the periods within the cat fact route parameter. To be fair, the more standard approach would be to pass only the cat-fact ID as the route parameter and then have the page do another REST call to retrieve the cat-fact. But unfortunately, the cat-facts API does not have IDs on the facts, only the facts themselves. So I did it in this weird way instead (and it also saves on the extra REST call which is nice).

(I did notice there are a lot of forks of Grapnel router, so maybe one of them has already fixed this issue.)