Why are there 2 update functions here reverting the same component?