Recently I was tasked with creating a simple file inventory system, which was a nice change from maintaining and extending big, years-old codebases. Excitingly I had complete freedom in choosing the front-end technology stack so I set out to review available options.
Back in the JS-that-almost-looks-like-JS world it seemed that TypeScript was gaining massive popularity, and it definitely seemed like something I could use. The syntax was close enough to vanilla JS to make the learning curve almost nonexistent, while the language features still provided a lot of benefits. The thing I liked the most, that was a major improvement from the last time I read about the language was definitely the @types repository on npm. It contains type definitions for most of the most popular JS frameworks and libraries, allowing to take full advantage of the type system even if the original author didn’t use TypeScript. That then, combined with React was my final choice (if you’re interested in how to set this combo up, there’s a great guide in the official TS docs).
After delivering the project at the end of 2017 I’m really happy with my choice. All the IntelliSense features in VSCode made writing TypeScript extremely easy and didn’t make me miss the comforts of IntelliJs PyCharm I use for backend development, which was a first as far as working with frontend for me. There’s also all the tooling you may need for automated code quality control.
There are a couple of conclusions from this. First, TypeScript is an excellent choice to start writing an app today, for all the reasons mentioned above. But I still think Elm is extremely exciting. With a more complex application the payoff for having the whole team learn the language will definitely be there, which is why I’m eagerly awaiting 1.0 release.