Should early return if the value is not changed, which avoids redundant UI refresh.