FbLitho repeats views in RecyclerCollectionComponent even when new section is loaded

54 Views Asked by At

FbLitho framework repeats views from the old section i.e Groupsection in RecyclerCollectionComponent even when a new section is loaded.

2

There are 2 best solutions below

0
On BEST ANSWER

This might happen due to caching in fblitho [not sure] but it can be resolved by releasing the parent litho view on which you are calling setComponent. just call parentView.release()

0
On

This definitely isn't expected behavior - if you can reproduce this outside of your personal app environment I'd recommend to submit a GitHub issue. Something to try is putting

@ShouldUpdate
protected static boolean shouldUpdate() {
  return true;
}

on the Section in question. It shouldn't be required so it's not exactly the right fix, but may also be an option to unblock.