Files
react/compiler/crates/react_hermes_parser/tests/fixtures/unknown-hooks-do-not-assert.js
2024-04-02 16:49:31 -07:00

12 lines
377 B
JavaScript

// Forget currently bails out when it detects a potential mutation (Effect.Mutate)
// to an immutable value. This should not apply to unknown / untyped hooks.
// Default feature flags:
// enableAssumeHooksFollowRulesOfReact=false
// enableTreatHooksAsFunctions=true
function Component(props) {
const x = useUnknownHook1(props);
const y = useUnknownHook2(x);
return y;
}