microsoft / TypeScript-React-Starter

A starter template for TypeScript and React with a detailed README describing how to use the two together.
MIT License
11.08k stars 1.21k forks source link

add more documents for react-router and redux #58

Open xcaptain opened 6 years ago

xcaptain commented 6 years ago

react-router doesn't work for me, says

Module not found: Can't resolve 'react-router-dom'

I'm using yarn add @types/react-router-dom to install react-router-dom

alecwhittington commented 6 years ago

Are you trying to install React Router or the types for it? Your code above will only install the type defs, not the actual library.

yarn add react-router-dom or yarn add react-router-dom --dev to install the library, run your other command to get the typedefs.

If you want Redux and plan on using react-router-redux, make sure to use yarn add react-router-redux@next --dev