'New fearture in react-router-dom v6 useOutletContext() issue, what versions support it
Solution 1:[1]
The useOutletContext hook and Outlet context was a feature introduced in v6.1.0.
<Outlet>can now receive a context prop. This value is passed to child routes and is accessible via the newuseOutletContexthook.
Uninstall the current version
npm uninstall -s react-router-dom
Either bump to this minimum version
npm install -s [email protected]
or install the current/latest version
-
npm install -s react-router-dom@6 -
npm install -s react-router-dom@latest
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |

