Use `setState` instead of manually overriding the state