JSTQL-JS-Transform/output_testing/897error.invalid.invalid-rules-of-hooks-d952b82c2597.js

7 lines
229 B
JavaScript
Raw Normal View History

// Invalid because it's a common misunderstanding.
// We *could* make it valid but the runtime error could be confusing.
function ComponentWithHookInsideCallback() {
(() => {
useHookInsideCallback();
}) |> useEffect(%);
}