dillon1000/react
Commit
Browse files Add frozen reason for props and hook arguments
Add frozen reason for props and hook arguments Improves the error message when mutating props or hook arguments. Previously, this would print a generic error about mutating global variables.
Changed paths6 files
First-parent comparisoncompiler/packages/babel-plugin-react-forget/src/HIR/HIR.ts ModifiedM compiler/packages/babel-plugin-react-forget/src/Inference/InferReferenceEffects.ts ModifiedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.mutate-hook-argument.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.mutate-hook-argument.js AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.mutate-props.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.mutate-props.js AddedPatch
Files changed
Rendering syntax-highlighted changes…