We started doing defacto static typing for our React components by using PropTypes. This provides runtime checking for the properties we pass to components. It means that we have to monitor the Browser console during development to actual spot issues.
But if we were to switch to TypeScript, then for a similar amount of code we would get compile time checks for the properties we pass. Of course, over time we can introduce static typing to other parts of the codebase.
Even if we use it just for Component properties it seems like a win, but I wonder if anyone got other opinions?
- Let’s do this! TypeScript FTW.