Agree with you @vndre
it been there for a long time. But people still doesn't know about this. I have searched for infinite scrolling react component on npm and haven't found any which is community maintained. Thanks for suggestion, I will try to improve quality of my sample code to be more realistic with api call. Thanks again :)
Yes, I have seen the react-infinite-intersection but, I was confused because they have very few download on npm.
There are two reasons why I'm more inclined towards the class components:
I'm more inclined towards the object oriented programming. So, I get more comfortable with class components and they are easy to understand for me
Some times before I have to add some feature in a functional components and it was developed by someone in organization. At the beginning there was no issue but as the component complexity increases the issues were getting worse. It's easy to write but it's easy to make mistakes too.
For creating small components like UI framework with independent components or stateless components, I use functional components but for components which are going be complex with lots of features, I prefer class components.
Thanks :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
this.state = {
arr: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
};
My heart omg 😱
Also the
IntersectObserver
API was introduced on chrome since 2016...Agree with you @vndre it been there for a long time. But people still doesn't know about this. I have searched for infinite scrolling react component on npm and haven't found any which is community maintained. Thanks for suggestion, I will try to improve quality of my sample code to be more realistic with api call. Thanks again :)
What about github.com/thebuilder/react-inters... ?
I believe a hook approach would make things easier.
Yes, I have seen the
react-infinite-intersection
but, I was confused because they have very few download on npm.There are two reasons why I'm more inclined towards the class components:
For creating small components like UI framework with independent components or stateless components, I use functional components but for components which are going be complex with lots of features, I prefer class components.
Thanks :)