What are nested routes?

Posted by Jennifer | Updated on

What are nested routes?

Generally, the app is composed of nested components which are nested multiple levels deep. The segments of a URL corresponds to a certain structure of these nested components. To render components into the nested outlet, you need to use the children option in VueRouter constructor config.

Let’s take a user app composed of profile and posts nested components with respective routes. You can also define a default route configuration when there is no matching nested route.

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers