News for hackers. Stuff that matters.
Re:React Router v5 by waingake on Thursday March 21, 2019 @02:19AM (#19449603)
I recently wrote a custom hook* which is serving me well so far.

https://gist.github.com/tim-field/99104278abfad1b8dd94d26717...

I combine this with a simple switch statement in my main component and it does the job.

  const [page, setPage] = useRouter('/')
*https://reactjs.org/docs/hooks-custom.html

There are no comments on this comment yet.