Ok, I’ve just started to work on adding router to my react project https://fortune.luka.sh! For the time being the app works based on its state managed by the redux, but routing functionality has turned out to be… desired I would say :) We’ll see how it goes. I’m not a react guru - definitely not!
And finally, the “router” is done! There still left a few things (from UI) to add (like a button that will allow the user to copy the link to the particular fortune) - but, yep, the challenge was to add the router itself (and I’m not the react programmer of course :)).
So each fortune has its own “db file” and “index” shown in the bottom-right corner - now, it is possible to add them to the URL address as the
fortune.luka.sh/DB_FILE/INDEX to get the exact link (to exactly that - visible - quotation).
An example - the address https://fortune.luka.sh/computers/10 leads to:
[A computer is] like an Old Testament god, with a lot of rules and no mercy. – Joseph Campbell