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.0BREAKING CHANGE release for use with:
~5.0.0~2.5.0dependencies update
@coreui/reactto~2.5.0react-router-configto^5.0.0react-router-domto^5.0.0BREAKING CHANGES 💥
v5Breadcrumb2SidebarNav2router💥 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 becauseBreadcrumbandSidebarNavcomponents have their own context object.It's important to use the same instance of the
react-router-dom v5library with template and coreui components.@coreui/reactversion2.5.0moves react-router-dom form dependencies to peerDependecies and takes the same library/module from the template/app instead. We have to passroutermodule object as a prop to<AppSidebarNav>and<AppBreadcrumb>.migration guide v2.1 -> v2.5 💥
update
dependenciesinpackage.json@coreui/reactto~2.5.0react-router-domto^5.0.0react-router-configto^5.0.0modify
DefaultLayout.jsimport react-router-dom module as an object
import new versions of components
AppBreadcrumb2andAppSidebarNav2(alias is optional, just keep consistency with markup)inject
routerobject as a prop to<AppSidebarNav>and<AppBreadcrumb>