set-state-compare

setState for React that compares with the current state and only sets the state if changed.