onChange(of:initial:_:) changes when same value assigned

Overview

  • When calling onChange(of:initial:_:) with initial as true, closure called even when the value assigned is the same as previous value (not just the first time, subsequently too).
  • However when initial value is false it is called only when value changes.

Questions

  1. Is this a bug?
  2. Am I missing something?
onChange(of:initial:_:) changes when same value assigned
 
 
Q