SimformSolutionsPvtLtd/react-native-story-view

[feature] FlashList instead of FlatList / suggestions

hirbod opened this issue · 4 comments

Hi,

are there any plans to make a more performant solution with FlashList, or is this out of scope for you guys?
I think FlatList at this point is being omitted by most of the devs and while I think your library is neat, I would not use it because of the underlying FlatList library.

FlashList adds another dependency, which I understand, but since this library already has native dependencies, adding FlashList should be really a tiny thing. Usually, everything works out of the box when using FlashList with little changes, most props are supported, some can even be omitted. Usually, just tiny steps are needed to support proper recycling.

I am thinking to fork this project and just adjust to my needs in order to support FlashList - but if you guys are open to support FlashList, we might be able to work on a solution together.

FlatList is only inside MultiStory and MultiStoryContainer, we might be able to just export two different Component and let the user pick. I would take care of supporting FlashList initially if you are interested.

Furthermore, I am not sure if the video cache proxy solution is something that should be baked into the library. It most likely covers your needs, but I think a good idea would be to make the StoryView adjustable, maybe as a separate package. Some folks might want to use expo-av or amazon-avs-player etc. Just some thoughts.

@hirbod Thank you for your suggestion
We’re working continuously to improve this library and fix issues if any. Also, we’d welcome pull requests which enhance functioning or fix bugs.

So feel free to create a pull request with a functioning that will enable FlashList support

I'll give this a try soon. I think we should just export like MultiStoryFlashList, or a prop and just conditionally render? What do you think. Or even replace FlatList?

@hirbod Definitely. We can have a separate Flashlist component as you mentioned.
We've used Animated.Flatlist here from react-native-reanimated so the transition effect we're getting in stroy is done through passing animated style in FlatList.
I guess that also needs to be handled additionally on the FlashList.