Back when I was using enzyme (like everyone else at the time), I stepped carefully around certain APIs in enzyme. I completely avoided shallow rendering, never used APIs like instance(), state(), or find('ComponentName'). And in code reviews of other people’s ...

I’ve participated in a framework migration at every company I’ve worked: Domo: Backbone -> Angular.js AtTask (now Workfront): JSPs / VanillaJS -> Angular.js Alianza: Angular.js -> React* PayPal: Backbone.js -> React *Alianza is a special case because that migration never ...

In How to write a React Component in TypeScript, I typed an example React component. Here’s where we left off: const operations = { '+': (left: number, right: number): number => left + right, '-': (left: number, right: number): number ...

Here’s our component without types: const operations = { '+': (left, right) => left + right, '-': (left, right) => left - right, '*': (left, right) => left * right, '/': (left, right) => left / right, } function Calculator({left, ...

In my interview “Testing Practices with J.B. Rainsberger” available on TestingJavaScript.com he gave me a metaphor I really like. He said: You can throw paint against the wall and eventually you might get most of the wall, but until you ...