Knewton has been incrementally converting its front-end React and backend Node.js codebases to TypeScript. In this series we highlight pitfalls we have encountered along the way, lessons we’ve learned, and best practices that we’ve developed.

react + react-router + typescript

For our first tip of this series, let’s look at Knewton’s preferred approach to defining the typescript types for a react-redux connected component. As a component author, it’s important to correctly specify your component’s property types so that users of your component reap the full benefits of type checking and aren’t mislead into using your component incorrectly. Doing this is fairly straightforward with a regular…

Alex Heitzmann

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store