Skip to content

[compiler] Add fixture for custom hook with use() not compiled#35963

Open
carlbergman wants to merge 1 commit intofacebook:mainfrom
carlbergman:compiler-hook-with-use-api-fixture
Open

[compiler] Add fixture for custom hook with use() not compiled#35963
carlbergman wants to merge 1 commit intofacebook:mainfrom
carlbergman:compiler-hook-with-use-api-fixture

Conversation

@carlbergman
Copy link

Summary

Custom hooks whose only invocation is the use() function are silently skipped by the compiler. This adds a fixture demonstrating the current (broken) output where useMyContext is not compiled.

This is the first PR per the development guide. A follow-up PR will fix the compiler to correctly detect use() calls and update the fixture output.

Ref #35960

How did you test this change?

yarn snap -p use-operator-in-hook

@meta-cla meta-cla bot added the CLA Signed label Mar 5, 2026
Custom hooks whose only invocation is the `use()` function are
skipped by the compiler. This fixture demonstrates the
current (broken) output where `useMyContext` is not compiled.

Ref facebook#35960
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant