JSTQL-JS-Transform/output_testing/538unknown-hooks-do-not-assert.js

11 lines
No EOL
386 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 = props |> useUnknownHook1(%);
const y = x |> useUnknownHook2(%);
return y;
}