dillon1000/react
Commit
Browse files Allow property loads from hook
Looking up certain properties on a hook is a common pattern for logging. It's non-ideal but it's not a bug to do this. This updates Forget to not error on this pattern.
Changed paths5 files
First-parent comparisoncompiler/packages/babel-plugin-react-forget/src/Validation/ValidateHooksUsage.ts ModifiedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.hook-property-load-local-hook.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.hook-property-load-local-hook.js AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/hook-property-load-local.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/hook-property-load-local.js AddedPatch
Files changed
Rendering syntax-highlighted changes…