dillon1000/react
Commit
Browse files [compiler] Add support for diagnostic hints (#34126)
Hints are meant as additional information to present to the developer about an error. The first use-case here is for the suggestion to name refs with "-Ref" if we encounter a mutation that looks like it might be a ref. The original error printing used a second error detail which printed the source code twice, a hint with just extra text is less noisy.
Changed paths3 files
First-parent comparisoncompiler/packages/babel-plugin-react-compiler/src/CompilerError.ts ModifiedM compiler/packages/babel-plugin-react-compiler/src/Inference/InferMutationAliasingEffects.ts ModifiedM compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.invalid-assing-to-ref-current-in-render.expect.md ModifiedPatch
Files changed
Rendering syntax-highlighted changes…