You could use setState() only after comparing the current state value and the new one and they are different.
↧
Answer by Ciocoiu Ionut Marius for ReactJS - Does render get called any time "setState" is called?
↧