call function to initialize state value react hook code example Example: usestate const [count, setCount] = useState(0);