Skip to content

Commit

Permalink
doc(react): Wrong type code in React example code (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
bc-stoney authored Feb 1, 2024
1 parent 4633c79 commit d3e3a7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/guide/framework-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ const customMatcher = {
const zxcvbn = new ZxcvbnFactory(options, customMatcher)

const usePasswordStrength = (password: string) => {
const [result, setResult] = (useState < ZxcvbnResult) | (null > null)
const [result, setResult] = useState<ZxcvbnResult | null>(null)
// NOTE: useDeferredValue is React v18 only, for v17 or lower use debouncing
const deferredPassword = useDeferredValue(password)

Expand All @@ -223,7 +223,7 @@ const usePasswordStrength = (password: string) => {
}

export default function PasswordStrength() {
const [password, setPassword] = useState < string > ''
const [password, setPassword] = useState<string>('')
const result = usePasswordStrength(password)
return (
<div>
Expand Down

0 comments on commit d3e3a7e

Please sign in to comment.