RR on enter hook react.js code example Example: react hooks const [state, setState] = useState(initialState);