CoreUI React is a free React admin template based on Bootstrap 5
12 August 2020
#226
68ce41d
92f55b8
eef84db
b31e452
be5d1f0
v2.6.1
scales.[x/y]Axes.barPercentage
is deprecated, use dataset.barPercentage
instead@coreui/coreui
to ^2.1.16
@coreui/react
to ^2.5.7
bootstrap
to ^4.5.0
chart.js
to ^2.9.3
core-js
to ^3.6.5
enzyme
to ^3.11.0
enzyme-adapter-react-16
to ^1.15.2
flag-icon-css
to ^3.4.6
node-sass
to ^4.14.1
react
to ^16.13.1
react-app-polyfill
to ^1.0.6
react-chartjs-2
to ^2.9.0
react-dom
to ^16.13.1
react-router-config
to ^5.1.1
react-router-dom
to ^5.2.0
react-test-renderer
to ^16.13.1
reactstrap
to ^8.4.1
react-scripts
to ^3.4.1
v2.6.0
reactstrap v8
. Breaking changes and deprecations, see: https://github.com/reactstrap/reactstrap/blob/master/CHANGELOG.md#800-2019-04-03
AppHeaderDropdown
with UncontrolledDropdown
@coreui/coreui
to ^2.1.12
@coreui/coreui-plugin-chartjs-custom-tooltips
to ^1.3.1
@coreui/react
to ^2.5.1
core-js
to ^3.1.4
enzyme
to ^3.10.0
enzyme-adapter-react-16
to ^1.14.0
react-router-config
to ^5.0.1
react-router-dom
to ^5.0.1
reactstrap
to ^8.0.0
v2.5.0
for use with:
~5.0.0
~2.5.0
@coreui/react
to ~2.5.0
react-router-config
to ^5.0.0
react-router-dom
to ^5.0.0
It turns out that this is not such a breaking change, as it seemed at first. Just update dependencies and you're good.
just update dependencies
in package.json
@coreui/react
to ~2.5.0
react-router-dom
to ^5.0.0
react-router-config
to ^5.0.0
React Router v5 uses the new React Context API, which is incompatible with version used in 4.3.
That's a breaking change. With a raw upgrade to v5, you can encounter an error message: You should not render a <Route> outside a <Router>
or You should not use <Link> outside a <Router>
etc... It means that Route, Link etc, can't find the correct context object because Breadcrumb
and SidebarNav
components have their own context object.
It's important to use the same instance of the react-router-dom v5
library with template and coreui components. @coreui/react
version 2.5.0
moves react-router-dom from dependencies to peerDependecies and takes the same library/module from the template/app instead. We have to pass router
module object as a prop to <AppSidebarNav>
and <AppBreadcrumb>
.
update dependencies
in package.json
@coreui/react
to ~2.5.0
react-router-dom
to ^5.0.0
react-router-config
to ^5.0.0
modify DefaultLayout.js
import react-router-dom module as an object
import * as router from 'react-router-dom';
import new versions of components AppBreadcrumb2
and AppSidebarNav2
(alias is optional, just keep consistency with markup)
import {
...
AppBreadcrumb2 as AppBreadcrumb,
AppSidebarNav2 as AppSidebarNav
...
} from '@coreui/react';
inject router
object as a prop to <AppSidebarNav>
and <AppBreadcrumb>
<AppSidebarNav navConfig={navigation} {...this.props} router={router}/>
<AppBreadcrumb appRoutes={routes} router={router}/>
v2.1.7
v4.3.x
v7.x
~2.1.7
v3.x
package-lock.json
with updated tar
dependencytest:cov
scripttrigger="legacy" delay={0}
(breaking change in reactstrap)@coreui/react
to ~2.1.7
@coreui/coreui-plugin-chartjs-custom-tooltips
to ^1.3.0
enzyme-adapter-react-16
to ^1.13.0
node-sass
to ^4.12.0
react
to ^16.8.6
react-app-polyfill
to ^1.0.1
react-chartjs-2
to ^2.7.6
react-dom
to ^16.8.6
react-test-renderer
to ^16.8.6
react-scripts
to ^3.0.1