You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Item.notifyChange is a very handy method when one does not want the hassle of calling diff util, however, this handy method breaks the unidirectional data flow technique.
possible issues
Since there isn't a way to backpressure these events, having a few of these will cause an IllegalStateException: Cannot call this method while RecyclerView is computing a layout or scrolling
This promotes a bad way of state management, one shall not change the UI state inside the UI itself, items should only describe the view and communicate state-related events to the upper layers like ViewModel/Presenter, the rest is their responsibility
Describe the solution you'd like
Deprecate Item.notifyChange method
Additional context
We are heavily using groupie in our codebase and the single source of our bugs and headaches is around this method. Unfortunately, we haven't set a lint rule to not use it and now a good portion of our code is affected by this method.
The text was updated successfully, but these errors were encountered:
Item.notifyChange
is a very handy method when one does not want the hassle of calling diff util, however, this handy method breaks the unidirectional data flow technique.possible issues
IllegalStateException: Cannot call this method while RecyclerView is computing a layout or scrolling
Describe the solution you'd like
Deprecate
Item.notifyChange
methodAdditional context
We are heavily using groupie in our codebase and the single source of our bugs and headaches is around this method. Unfortunately, we haven't set a lint rule to not use it and now a good portion of our code is affected by this method.
The text was updated successfully, but these errors were encountered: