rerender updates an already rendered React component with new props while preserving its mounted instance. This makes it useful for testing prop changes without resetting component state. section 10.2.1
Verify state survives a prop change
Render <Counter start={10} />, call rerender(<Counter start={20} />), then assert that the heading still reads “Counter: 10”. The test demonstrates that changing start does not reinitialize the existing state.
