English

one route one component

2020-03-09  本文已影响0人  许泽武

let us say that one route connect to one component. or,  in other words, one unique route or url that represent one unique page. so we can simply apart the componet to two part——contain the route or not.

once the component includes more than one route,  that the router must be the outermost father element of the componet.

let us always remember that one Link connect to one Route. so the numbers of the route must always be same to the link.  

then, remember that all the Links can't outside the route. 

finally,  remember that all the component have their father compoent——route.  just as any page have the url, the route component is the url, and we use  various function and style components to compose the pages.

上一篇下一篇

猜你喜欢

热点阅读