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
Name | Type | Default | Description |
---|---|---|---|
children | ReactNode | 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>
);
}