Routing examples from production

I’m looking for examples of (web) routing in full ReScript production apps. What are you using today? What do you like about it, what do you dislike? What have you found scales once the amount of routes grow, and what have you found hasn’t?

I’m interested in figuring out what pain points there are and get some insight on what people are using for routing in medium to large sized projects.


This days, I enjoy using Next.js. It’s routing is simple but flexible and provide more than routing. A good choice for a web app.
I use .js proxy file that hits my src/pages/Page*.res modules.

1 Like

@MoOx cool! :smiley: How are you handling query params? And do you do any additional abstraction yourself around producing URLs etc?

Using RescriptReactRouter and handling query param with a hand-rolled parser (I’ll probably move to URLSearchParams soon).

The most useful stuff the API allows:

  • | list{"path"} if isLogged => cases
  • | list{"settings", ...subpath} => <Settings subpath /> to let components manage their sub routes

I also use Next.js nowadays. It binds relatively well to rescript.

Great! :smiley: Same question for you then - how do you handle query params, and do you have any additional abstractions in place for producing URLs etc?

NextJS has pretty good API’s for that, I just bind to them.

1 Like

Same here, I just use my bindings.
I just pushed them on GitHub and npm
They are incomplete but that’s a start :slight_smile:

1 Like