JSTQL-JS-Transform/output_testing/889error.invalid.invalid-rules-of-hooks-0de1224ce64b.js

9 lines
No EOL
278 B
JavaScript

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