Skip to content

Commit b661344

Browse files
committed
chore: add migration docs
1 parent 6ac9a1d commit b661344

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

migration.md

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

0 commit comments

Comments
 (0)