Jul 27, 2017 · 1 min read
Just use typescript?
You can create compile-time interfaces for your props and states that will appear as generics of your class, making it super-clear what the interface of your component is.
It has native support for the member arrow functions so binding is not an issue anymore.
Without even starting to talk to all the advantages of having a properly strongly typed, compiled checked language that can help you finding errors before you hit them at runtime, improving the dev experience with autocomplete, refactoring, and so on.
Really in 2017 using typescript or at least flow over regular javascript should be a requirement for any decent ui project.