Nhảy tới nội dung

ZMPRouter

ZMPRouter component: Wrapper thay thể cho BrowserRouter của react-router, component này config sẵn basename để có thể định tuyến trên mini app

Properties

ZMPRouter

NameTypeDefaultDescription
childrenReactNode

là routes wrapper có thể là AnimationRoutes của zmp-ui hoặc Routes của react-router-dom

Example


function MyApp(props){
return (
<App>
<ZMProuter>
<AnimationRoutes>
<Route path="/" element={<HomePage />} />
<Route path="/page1" element={<Page1 />} />
</AnimationRoutes>
</ZMPRouter>
</App>
);
}