In-depth understanding of React Router: Context, Hooks, Refs, Memo features explained - SegmentFault 思否
this.context.router is undefined in ES6 class constructor · Issue #1059 · remix-run/react-router · GitHub
![react-router throwing TypeError: useContext(...) is undefined when using useHistory - Stack Overflow react-router throwing TypeError: useContext(...) is undefined when using useHistory - Stack Overflow](https://i.stack.imgur.com/QKwdZ.png)
react-router throwing TypeError: useContext(...) is undefined when using useHistory - Stack Overflow
![React Context with TypeScript: Part 4 - Creating a context with no default and no undefined check | Building SPAs React Context with TypeScript: Part 4 - Creating a context with no default and no undefined check | Building SPAs](https://www.carlrippon.com/static/3dd4ca8acfccdb1549f5b7647bfe0db1/600f0/typed-react-context-4.jpg)