Azure-Samples / application-insights-react-demo

Monitoring a simple React App with the Application Insights Web SDK
MIT License
75 stars 72 forks source link

withRouter was not fount in react-router-dom #30

Open mgrub1 opened 2 years ago

mgrub1 commented 2 years ago

On the Basis of: #20

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Using this example in an React 17 environment produces the error mentioned in the description. withRouter is a deprecated asset of react-router-dom.

Any log messages given by the failure

Compiled with problems:

WARNING in ./src/telemetry-provider.jsx 74:15-25

export 'withRouter' (imported as 'withRouter') was not found in 'react-router-dom' (possible exports: BrowserRouter, HashRouter, Link, MemoryRouter, NavLink, Navigate, Outlet, Route, Router, Routes, UNSAFE_LocationContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, createRoutesFromChildren, createSearchParams, generatePath, matchPath, matchRoutes, renderMatches, resolvePath, useHref, useInRouterContext, useLinkClickHandler, useLocation, useMatch, useNavigate, useNavigationType, useOutlet, useParams, useResolvedPath, useRoutes, useSearchParams)

Expected/desired behavior

Will this project be updated to be supported by/with React17 anytime soon?

OS and Version?

Windows 10

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

nickwgrit commented 2 years ago

Would love to see an update to the sample app that's compatible with react-router-dom v6.