Shift4 Interview Question

they asked me to describe the difference between useeffect and use state