You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

4 年之前
12345678910111213141516171819202122232425262728293031323334
  1. # Migration from version 2
  2. Migration from version 2 must be performed manually because the components library `@coreui/coreui-react` has been completely rewritten.
  3. The docs of the new components are available [here](https://coreui.io/react/docs/)
  4. The good news is that most probably it will be sufficient to migrate layout components (Sidebar, Header, Footer, Aside) and `Switch` component
  5. The best way to do a migration is:
  6. 1. Install `@coreui/coreui-react` v3
  7. 2. Make a copy of the current `containers` folder
  8. 2. Paste [containers](https://github.com/coreui/coreui-free-react-admin-template/tree/master/src/containers) folder from v3 template to project
  9. 3. Correct routing paths
  10. 4. Add previous content to new template layout components
  11. 5. Replace `Switch` components with `CSwitch`
  12. Layout components/ corresponding components in version 3
  13. - Aside -> CSidebar (with prop aside={true})
  14. - AsideToggler -> CToggler
  15. - Breadcrumb -> CBreadcrumbRouter
  16. - Footer -> CFooter
  17. - Header -> CHeader
  18. - HeaderDropdown -> CDropdown
  19. - NavbarBrand -> CSidebarBrand
  20. - Sidebar -> CSidebar
  21. - SidebarFooter -> CSidebarFooter
  22. - SidebarForm -> CSidebarForm
  23. - SidebarHeader -> CSidebarHeader
  24. - SidebarMinimizer -> CSidebarMinimizer
  25. - SidebarNav -> CSidebarNav + CSidebarNavDropdown + CSidebarNavItem
  26. - SidebarToggler -> CSidebarToggler
  27. - Switch -> CSwitch
  28. After the migration is done, you can start using new components of `@coreui/coreui-react` v3 library.