I am working on a project where I need recyling a list of litho components using a custom recyclerview adapter. The only issue is that I can't use RecyclerComponent which comes as part of the litho library.
Is there a way to do this? Specifically, what needs to go inside onCreateViewHolder() and onBindViewHolder()?
You will want to use
RecyclerCollectionComponentwith the Sections API if possible: https://fblitho.com/docs/recycler-collection-component.If you can't do that for some reason, you also have the option to use RecyclerBinder directly by adding components via
insertItemAt/insertRangeAt.RecyclerBinder#getInternalAdapterwill give you theRecyclerView.Adapterthat you can give to yourRecyclerView.