Only re-render the screen when necessary.