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