Skip to content

Commit

Permalink
fix: changed useClientEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
shairez committed Apr 5, 2023
1 parent ec095ba commit 282ad2b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { component$, useClientEffect$, useStore, useStylesScoped$ } from '@builder.io/qwik';
import { component$, useVisibleTask$, useStore, useStylesScoped$ } from '@builder.io/qwik';
import { DocumentHead, useLocation } from '@builder.io/qwik-city';
import styles from './flower.<%= styleExtension %>?inline';

Expand All @@ -11,7 +11,7 @@ export default component$(() => {
number: 20,
});

useClientEffect$(({ cleanup }) => {
useVisibleTask$(({ cleanup }) => {
const timeout = setTimeout(() => (state.count = 1), 500);
cleanup(() => clearTimeout(timeout));

Expand Down

0 comments on commit 282ad2b

Please sign in to comment.