SIGN IN SIGN UP
facebook / react UNCLAIMED

The library for web and native user interfaces.

0 0 0 JavaScript

[compiler] Collapse CompilerError.{invariant,simpleInvariant} (#35614)

`invariant()` was a pain to use - we always record a single location,
but the API required passing a compiler detail. This PR replaces
`invariant()` (keeping the name) with `simpleInvariant()`s signature,
and updates call sites accordingly. I've noticed that agents
consistently get invariant() wrong, which aligns with it being tedious
to call when you're writing code by hand. The simplified API should help
a bit.

DiffTrain build for [006ae379727ebceb82d03929222a71104d01135f](https://github.com/facebook/react/commit/006ae379727ebceb82d03929222a71104d01135f)
J
josephsavona committed
2e26317da6af4e206292d133a09d0d86bf832481
Parent: d89918a