Junior — Senior
State toggle timeout when input data changes
livecode
Task condition
The component receives a prop data, which can be updated. Each time data changes, a delay of 3 seconds should be triggered, after which the focusState state toggles.
const App = ({ data }) => {
const [focusState, setFocusState] = useState(false);
return null;
}