Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Help needed] Vote for React Native's feature requests so we can improve the plugin #203

Open
bd-arc opened this issue Oct 31, 2017 · 28 comments

Comments

@bd-arc
Copy link
Contributor

bd-arc commented Oct 31, 2017

Hey there,

We're really pleased with how the plugin has grown over the past few months: there is now a large user base and it is used in numerous apps. We're proud of that and we want to thank you all for your appreciation and for making the most out of it! 😊 You've motivated us to devote countless hours maintaining and regularly improving the plugin, and we've been happy to give back to the community.

But now we're starting to feel tired of fighting React Native's core again and again, to work around the many issues of the FlatList and ScrollView components while knowing that the next critical one is just around the corner.

Now is the time to let the React Native team know how badly we need them to improve those components! 💢 (and then we'll make the plugin even better, of course 😉)

The main issues of the ScrollView/VirtualizedList/FlatList components are the following:

  • there is no scrollEnd event
  • scrollTo method doesn't accept any callback
  • Android's scrollTo animation is quite brutal
  • it is not possible to specify a scroll duration
  • there are performance issues.

React Native has a dedicated canny for feature requests. Here are the ones that need your vote the most:

If you find other feature requests or React Native issues that are relevant, do not hesitate to list them in this thread so we can vote together as a group and help putting the focus on those.

Remember that every vote counts ✊

@batmanhit
Copy link

I am doing it now.

@florentroques
Copy link
Contributor

Done!

I added a pull request to add visibility to this issue on readme file.
Another suggestion:
show this issue link when a user is installing the plugin

@Eyesonly88
Copy link

Done!

1 similar comment
@nadavoran
Copy link

Done!

@ifyapishore
Copy link

+!

@adamski
Copy link

adamski commented Dec 20, 2017

Done, thanks for your efforts on this!

@ssssssssssss
Copy link

ssssssssssss commented Jan 12, 2018

Dear @bd-arc , I think the snapToInterval for Android has been merge to RN master last time I check. facebook/react-native@b2848a5

@bd-arc
Copy link
Contributor Author

bd-arc commented Jan 12, 2018

Hey @ssssssssssss,

Thanks for keeping me posted. Unfortunately, I don't think that the feature has been implemented yet since two PRs address it but none has been merged so far...

@bd-arc
Copy link
Contributor Author

bd-arc commented Jan 16, 2018

@ssssssssssss Apparently you were right, but the feature was added in another commit: facebook/react-native@ddd65f1

Can't wait to see version 0.53.0 land and try it out!

@Adirael
Copy link

Adirael commented Jan 16, 2018

That's awesome!

Hopefully a vertical snap PR will be accepted soon. On the two PRs mentioned by @bd-arc is deemed as not as useful, but now that we have the horizontal one merged it's a good time to do the vertical too.

@bd-arc
Copy link
Contributor Author

bd-arc commented Jan 16, 2018

@Adirael I agree with you, and that's exactly what I said in this comment to one of the PR.

Unfortunately, if snapToAlignment and vertical handling aren't also implemented, we won't be able to really improve the plugin...

@khaledwj90
Copy link

+1

@bd-arc
Copy link
Contributor Author

bd-arc commented Sep 28, 2018

This recent commit smells pretty good!

The version 0.58 of React Native might finally gives us the means to improve the plugin drastically. Wait and see ;-)

@Titozzz
Copy link

Titozzz commented Oct 19, 2018

@bd-arc I linked it in the community discussion to try and get it in 0.57.4

@Titozzz
Copy link

Titozzz commented Oct 19, 2018

@kelset gave me that link : facebook/react-native@ef7e99c

Turns out it's already here in 0.57 @bd-arc , so what are the next steps

@bd-arc
Copy link
Contributor Author

bd-arc commented Oct 19, 2018

@Titozzz Well, a huge bunch of tests awaits us then! We need to see how props snapToInterval and snapToOffsets behave on both iOS and Android.

If someone wants to jump in and create a few public test cases on Snack, this would be awesome!

There is one problem though: we still don't have a proper callback mechanism. The aim is to ditch the current hacky solution altogether, but there is no way to do that until something is implemented on the native side by the Facebook team...

@RWOverdijk
Copy link

RWOverdijk commented Mar 22, 2019

Update? for this

Implemented fully for both vertical and horizontal scroll views in facebook/react-native@fd744dd. This will make it in the next release 0.58

@tobiaslins
Copy link

tobiaslins commented Oct 1, 2019

Take a look at https://github.com/CrowdLinker/react-native-pager
It's made with reanimated to tackle the performance issues

Just as an inspiration for future development. Still love this library tho

@RWOverdijk
Copy link

Looks good. Don't appreciate the offtopic spam though.

@bd-arc
Copy link
Contributor Author

bd-arc commented Oct 1, 2019

@RWOverdijk I appreciate the intent ;-) A lot of goodness might come from what @tobiaslins has created though.

@tobiaslins Well, I find your plugin really interesting! Just took a look at the source code and it seems you're on your way of achieving what I've been postponing for years — see #40 and #250 if you want to know what I mean.

Quick questions:

  1. How have you addressed memory issues with huge numbers of items?
  2. Could you share your roadmap? Does it include a loop feature?
  3. Would you be interested in finding a way to "blend" our respective plugins? Obviously this needs to be discussed in length; I just want to get the temperature at this point :-)

@tobiaslins
Copy link

@bd-arc
"Sadly" I havn't built this library. I just did a small PR and I'm using it in a new app I'm building with focus on high performance (using lot of rn-reanimated stuff)

The creator is @ajsmth maybe he can answer you this questions. Would love to see you working out something together!! Keep up the great work!

@ajsmth
Copy link

ajsmth commented Oct 1, 2019

hey there -- i would say that the repo is still immature so please take my answers with a grain of salt

  1. a combination of slicing children to fake out "virtualization" and a ton of memoization. reanimated uses mutable nodes so child slides rerender as little as possible. i would say the ability to slice children is the most important aspect of handling larger lists, and reanimated is crucial to handling smooth animation

  2. i am in the process of building another library that uses the pager heavily, if something comes along that i absolutely need from the pager itself then i might add to it, but the core api and features are set for the time being -- my focus is on fixing bugs and issues that surface as I use it more and more. there are a couple implementations for a loop feature that i have in mind, but its not a priority right now as it's something that can be achieved with wrapper components

  3. i'm always open to discuss / chat about this!

cheers

@bd-arc
Copy link
Contributor Author

bd-arc commented Oct 3, 2019

@ajsmth Thanks a lot for your answers!

I'm really interested in what you've created because using such a base for this plugin would mean no more pesky FlatList bugs (🙏), better animations and, at last, some control over it.

As I see it, the tricky parts are:

  • the handling of large lists
  • the loop feature
  • the dynamic addition/removal of items.

You seem to have a great vision about dealing with all this. If you are, or anyone else is, interested in adding those features to your pager, I'll be more than happy to "connect the dots" with the rest and make the end result the new carousel!

Let me know what you think.

@ajsmth
Copy link

ajsmth commented Oct 3, 2019

no problem!

from what i can tell the only missing feature from your list there is the loop feature. as i said above, i've been focused on a few other things at the moment so this will likely take some time, but it's something i'll keep in mind. if anyone else is willing to give this a shot, feel free to reach out

@nihp
Copy link

nihp commented Jan 28, 2020

I have a suggestion. While scrolling from one card to another in First example gif we need to add a scroll animation too.

i.e) If we scroll a nook means it shows a scroll animation. I need that support too in my app. So we can show the scroll animation here

@bd-arc
Copy link
Contributor Author

bd-arc commented Apr 6, 2020

It was more than time to give this plugin a heavy lifting!

Happy to report that 90% of the job is already done. Now I need you all to test, provide feedback, and even jump in if you feel like it 😉

Click here to learn everything about the upcoming v4!

@dohooo

This comment was marked as spam.

@MKaidan
Copy link

MKaidan commented May 25, 2022

Discord spoke about their issues with FlatList in this blog post: https://discord.com/blog/how-discord-achieves-native-ios-performance-with-react-native

Their solution was a new, custom-made FastList component: https://gist.github.com/derekstavis/d8f6a00e14a4259224aafafab14ffd3e

Perhaps this can help you with performance and the other issues you've listed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests