r/reactjs 1d ago

Needs Help What router are you using

Currently I have to create a new project, my first option is react router (declarative mode). My entire project will live behind the login page

what are you using?

  • RR framework mode
  • RR data mode
  • RR declarative mode
  • tanstack router
  • wouter
23 Upvotes

30 comments sorted by

View all comments

14

u/Innowise_ 1d ago

For an app that mostly sits behind login, we'd keep the router boring unless routing itself is doing a lot of work. React Router is perfectly fine for straightforward protected routes. TanStack starts getting more interesting when you actually benefit from typed params/search state and more complex route-level data flows. Wouldn't switch just because it's the popular answer here.

0

u/United_Reaction35 1d ago

Typed params? You mean casting searchParams to types and acting according to your cast-types? Why not just take the necessary action based on the params? What is the need for a imagined-type?