Using automatic route detection
Congratulations! You're successfully using automatic route detection in your React Router application! 🎉
In this exercise, you have installed the
@react-router/fs-routes
package and registered your
routes in the app/routes.ts
file.From now on, any route you add to the
app/routes
directory will be automatically detected
and registered in your application, saving you time and effort.🧝♀️ Now that we have the basic routing down, I'm going to help you out by adding UI and styling
your app for the next few exercises. Although, I don't really know how to add the stylesheets
and fonts to your app, so you will have to figure that part out on your own!
Additional considerations
The package we used only supports a single layer of nested routes. If you need more complex
nesting, you can use the
remix-flat-routes
package instead, which supports deeper nesting,
and don't let the name fool you! It works perfectly fine with React Router framework mode projects.Find it here: 📜 https://github.com/kiliman/remix-flat-routes
Take a breather, and let's continue once you're ready! 🚀