dillon1000/react

Commit

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.
Browse files
Changed paths5 files
First-parent comparison
M compiler/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 Added
Patch

Files changed

Rendering syntax-highlighted changes…