two context react hook declared both with state code example
Example 1: react hooks
const [state, setState] = useState(initialState);
Example 2: react hooks
useEffect(() => {
document.title = `You clicked ${count} times`;
});
const [state, setState] = useState(initialState);
useEffect(() => {
document.title = `You clicked ${count} times`;
});