use react state hooks insidr javascrpt function code example Example: usestate const [count, setCount] = useState(0);