-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(content): qwik update PageTitle.tsx (#224)
* Update PageTitle.tsx The API changed since this example was added. See QwikDev/qwik#3215 and https://qwik.dev/docs/components/tasks/#usevisibletask * Change all occurrences of useClientEffect$
- Loading branch information
Showing
3 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { component$, useClientEffect$, useRef } from "@builder.io/qwik"; | ||
import { component$, useVisibleTask$, useRef } from "@builder.io/qwik"; | ||
|
||
export const InputFocused = component$(() => { | ||
const inputElement = useRef(null); | ||
|
||
useClientEffect$(() => inputElement.current.focus()); | ||
useVisibleTask$(() => inputElement.current.focus()); | ||
|
||
return <input type="text" ref={inputElement} />; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters