1. 7
  1.  

  2. 4

    Failing more aggressively on these errors means not allowing the application to continue running in a corrupted state — reducing the distance between where you trip (the real problem occurs) and where you hit the ground (when React blows up because its internal bookkeeping is corrupt). This makes certain errors in React components easier to understand and fix.

    This metaphor for explaining the difference between an incorrect action that causes an error and the arrival of the error itself is wonderful and I’m totes stealing it in future.

    1. 1

      Thanks! I myself stole it from a mentor of mine who used it in the context of C++, where you can imagine lots of bugs present themselves this way.