qwik icon indicating copy to clipboard operation
qwik copied to clipboard

Custom hook useClientEffect runTimeQrl error only with .js extension

Open jweb89 opened this issue 2 years ago • 0 comments

Qwik Version

0.9.0

Operating System (or Browser)

MacOS Chrome

Node Version (if applicable)

16

Which component is affected?

Qwik Runtime

Expected Behaviour

Custom hooks should be able to use useClientEffect hook regardless of file extension.

Actual Behaviour

useClientEffect in custom hook does not work with .js file extension. Seems to work fine with .jsx, .ts, and .tsx

Additional Information

Screen Shot 2022-09-24 at 1 14 33 PM

Route with test.

Using .js file extension Screen Shot 2022-09-24 at 1 15 13 PM

Using .ts Screen Shot 2022-09-24 at 1 15 43 PM

Custom hook with useClientEffect throws runtimeQrl error with .js extension

export const useConsoleLog = () => { useClientEffect$(() => { console.log('called'); }); };

jweb89 avatar Sep 24 '22 17:09 jweb89