javascript - In React-Router docs, what does this paragraph mean in the "Index Routes" section? -


in lesson 8 of react-router docs, discussing "index routes", describe following paragraph:

this work fine, we'll want home attached route about , repos in future. few reasons include:

  • participating in data fetching abstraction relies on matched routes , components.
  • participating in onenter hooks
  • participating in code-splitting

also, feels keep app decoupled home , let route config decide render children. remember, want build small apps inside small apps, not big ones!

i fine rest of docs, i'm having hard time understanding they're talking here.

1- mean "home attached route"?

2- "data fetching abstraction", why thing?

3- code-splitting?

i believe fits format of questions here (objectively answerable, related software). in advance.

  1. every route associated component (not other way around). says may want component rendered not in / (default path without using router) on given route.

  2. i'm not one, think refers capability of component load different data based on route, minimizing payload.

  3. from the webpack documentation:

for big web apps it’s not efficient put code single file, if blocks of code required under circumstances. webpack has feature split codebase “chunks” loaded on demand.


Comments