reasonml-q-a icon indicating copy to clipboard operation
reasonml-q-a copied to clipboard

Setting up routes?

Open zth opened this issue 4 years ago • 0 comments

Question

@michael_rispoli on Twitter asked the following question

How to setup routes? Is it best to do something like next.js or just go with react router to start off?

Answer

ReasonReactRouter

Using either Next.js or React Router should be fine in Reason if that's what you need.

ReasonReact ships with a minimal, built-in and very powerful router called ReasonReactRouter. It's implemented using hooks in React, leverages the power of pattern matching, and is really easy to get started with. Read more about it here.

Go ahead and try it first before reaching for other solutions. It's very powerful and ergonomic to work with once you get the hang of it. It's also easy to build your own abstractions on top of when needed.

zth avatar Feb 12 '20 19:02 zth