etiennelenhart / Eiffel

Redux-inspired Android architecture library leveraging Architecture Components and Kotlin Coroutines
MIT License
211 stars 14 forks source link

Use 'null' to determine unchanged state #96

Closed etiennelenhart closed 5 years ago

etiennelenhart commented 5 years ago

Currently EiffelViewModel performs an equality check to determine whether the State has been updated. This may result in a performance hit for more complex states and confuse users since LiveData emits unchanged but re-set values.

Therefore the return type when invoking Update should be made nullable to indicate when no state update has been performed.