ReactComponentKit/ListKitExamples

Update EmojiList

Closed this issue ยท 1 comments

Hi, thank you to showing us, how can we use ListKit, awesome great examples ๐Ÿ‘ Is there a special reason why you create a new snapshot and apply it in the updateSnapshot() function, instead of updating the initial snapshot you already have?

Can this cause performance problems if you always create a new snapshot instead of updating the existing one?

Also i am interesting to using Combine with @Published properties. Could you maybe add an example with Combine. That would be really cool. Thank you

@niklasgrewe Hi, niklasgrewe. First of all, thanks for your concern. the reason why create the new snapshot in updateSnapshot() is recofigureItems is available on iOS 15.0+. and along with the document.

The only mechanism to update the data for existing items is to apply a new snapshot containing the new data structures, which causes the diffable data source to perform a delete and an insert for each changed item.

I will implement an example using ListKit and Combine. before that it will be good chance to check out my other open source Redux.

thanks. ๐Ÿ˜Š