captivationsoftware / react-sticky

<Sticky /> component for awesome React apps
MIT License
2.64k stars 385 forks source link

what is the recommended replacement? #208

Closed fisx closed 6 years ago

fisx commented 7 years ago

could you leave a line in the README as to what captivationsoftware is using now that is better than react-sticky, and what other alternatives have been considered?

any hints greatly appreciated. sorry to see this orphaning out, thanks for the good work!

dbarbalato commented 7 years ago

Not really sure what a good alternative is - if anyone has suggestions I'd be happy to update the README.

FWIW, we still use react-sticky on our projects. In fact, we exclusively use the 6.x API. The current offering is by no means broken - it works as intended, and is a very powerful, customizable lib. We simply don't have the bandwidth to keep up with user demands, especially as the React community continues to grow.

Anyway, thanks for saying thanks! Quick aside - as the core contributor of this project, it was always a little discouraging to see people's negative comments show up in issues / PRs on occasion, and that is a (small) part of the reason Captivation is turning its attention elsewhere. A helpful reminder to everyone: be considerate of the efforts of open source contributors - these are people working for you for free!

fisx commented 7 years ago

oh good, glad to hear it's still in use.

thanks again (-:

danse commented 7 years ago

Not really sure what a good alternative is - if anyone has suggestions I'd be happy to update the README

I've been wondering whether to use React Sticky or to opt for a more lightweight solution relying more on CSS, and maybe on very little Javascript logic to coordinate the triggering of all the style changes.

I interpreted the discontinuity in the maintenance of React Sticky as a sign that more lightweight solutions were now preferred, but this conversation made me realise that it's a matter of effort.

Even in a context where the CSS rules are defined by the user and are more customised, the bits of Javascript logic should be wrapped in a component, and that will probably look like some core parts of React Sticky. That would be smaller and probably more maintainable.

Are you aware of any similar effort? While i ask, let me use the opportunity to say thanks as well, for sharing this component with all of us :heart:

kumarharsh commented 7 years ago

The AutoAffix from react-overlays is worth a shot. I've been using it for some time, and it works well. But it's a little buggy, so I wanted to find a better alternative, and landed here - sad to see this fall out of maintenance. Will try this out over the weekend to see whether this works better than AutoAffix.

lcvbeek commented 7 years ago

I've switched to https://github.com/gm0t/react-sticky-el - had some issues, but works like a charm now. Highly customizable and supports stick-to-bottom!

fisx commented 7 years ago

that looks promising. thanks, we'll take a look!

flood4life commented 7 years ago

https://github.com/yahoo/react-stickynode This one is pretty nice as well, it was a really smooth transition for me.

fisx commented 7 years ago

thanks!

meanwhile we've switched to a css-only solution, and it turned out to be extremely simple (essentially, just add position: sticky to the right one or two classes) and flexible (if you need stickiness state inside react, just update it in the DOM event handlers).

now i'm wondering if there is a reason for react libraries at all. support for old / bad browsers?

kumarharsh commented 7 years ago

That is one reason why all of these might have fallen out of maintenance. I'm also using a css-only solution, and patching IE's implementation.