react-router
and react-router-dom
are two separate npm packages where one extends the other. react-router
contains the base logic while react-router-dom
bind this logic to the web and is the package that is actually used in a typical React project. There is also the react-router-native
package for React Native which is rarely used and has 32k weekly downloads compared to 4.2 million for react-router-dom
. Both versions are simply called "React Router" in their docs.
What is the best way to deal with the associated tags on Stack Overflow?
- react-router 15,402 questions
- react-router-dom 3,375 questions
- 1,555 questions tagged with both
- react-router-native 31 questions
Though technically different, the react-router and react-router-dom are essentially used as synonyms. Virtually every question on react-router has to do with the web package rather than the native one. I would like some canonicalization here.
[react-native]
and[react-router]
they should probably be first retagged to[react-native] [react-native-router]
react-router-dom
|react-router-native
to these questions as it is the more specific tag, and leave the more generalreact-router
since it has more widespread visibility. I totally agree when used together like this they are basically synonymous and redundant. Very rarely have I come across a core-specificreact-router
-only question. I'm honestly a bit more concerned about more easily identifying thereact-router-dom
versions as there are many breaking changes between v5 and v6, though this may be an entirely different conversation.