Defensive Modern Javascipt
At work I’ve been recently exposed to a large and complicated React application written in ES6. Of all the refactoring I’ve been undertaking, I have noticed that there was not much defensiveness built into the classes and functions. By defensive programming, I mean writing the code in such a way that expects it to fail, and gracefully handles common and recurring problems in JS. You do this so your application will continue regardless of any unforeseen problems that occur.