Component skips some of the assignments #1: changed to handle state on both sides correct.