How many routes do you have?


#1

I’m starting to make more and more routes for my app but I feel like I’m getting to a point where I may have too many. So I wanted to poll you all and see what amount seems average / common. I’m in the 11 to 15 category with 14 routes at the moment.

  • none
  • 1 to 5
  • 6 to 10
  • 11 to 15
  • 16 to 20
  • more than 20

0 voters

Also, since it’s related and I’m curious

  • Iron Router
  • Flow Router
  • React Router

0 voters


#2

Depends on the app. I don’t know why creating a poll about this would be useful.


#3

I’ve heard of apps with hundreds! So it’s useful to organize them in some nice way so that you can maintain them effectively.


#4

I use Angular UI Router, I manage them by defining one route/state/control per file. And group states together using index.js so I can package them in individual folders.

In addition I have 3 top level states

  • sign-in
  • not-found
  • home

At least 2 abstract states

  • unauthenticated
  • authenticated (which could be authenticated-admin, autheneticated-user, etc.)

And each CRUDL type construct would have their own top level state followed by their substates

  • index.js (to group it together)
  • add
  • edit
  • list

Once you have the core domain object work done, you add “business” routes to make it easier for people to use your product by going through a business transaction flow such as creating a social work case (search for duplicate -> register person -> capture case header information -> activate case) each of those being their own route. So you can predict the number of states that need to be created. Useful for estimations.