Added a guard against re-rendering when no changes