Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
v2.5.0
BREAKING CHANGE release for use with:
~5.0.0
~2.5.0
dependencies update
@coreui/react
to~2.5.0
react-router-config
to^5.0.0
react-router-dom
to^5.0.0
BREAKING CHANGES 💥
v5
Breadcrumb2
SidebarNav2
router
💥 see > Breadcrumbrouter
💥 see > SidebarNavReact 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>
orYou should not use <Link> outside a <Router>
etc... It means that Route, Link etc, can't find the correct context object becauseBreadcrumb
andSidebarNav
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
version2.5.0
moves react-router-dom form dependencies to peerDependecies and takes the same library/module from the template/app instead. We have to passrouter
module object as a prop to<AppSidebarNav>
and<AppBreadcrumb>
.migration guide v2.1 -> v2.5 💥
update
dependencies
inpackage.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 new versions of components
AppBreadcrumb2
andAppSidebarNav2
(alias is optional, just keep consistency with markup)inject
router
object as a prop to<AppSidebarNav>
and<AppBreadcrumb>