Can you elaborate why we should use IntersectionObserver/ResizeObserver?
Currently there is no logic in place to do the calculation and detect if there is more available content or not, so I'm 100% sure if understand the issue
I guess it doesn't have to be a React component, you are right. But just by doing so you get a lot of things for free and makes it easier for people to start using it, like, you just install it, require it, and you are good to go... that was the motivation beyond using React for it
I fixed the issue, was unrelated with the component itself, can you please have a look again and verify that it works fine? https://zzarcon.github.io/react-circle/
I'd recommend either killing that altogether as it definitely gives the perception of bad performance.
Or... at least take into account the delta of the progress change when doing animation. For instance, if going from 5 to 10%... a slower animation is fine. If going from 0 to 100%, the animation should be much quicker.
A lot of the work seems to be the React diffing? The only thing that changes between frames when dragging the slider is the style attribute.
Furthermore, the author seems to have included the development version of React. And the author used development settings for the webpack compilation. The compiled JS is full of eval() calls.
The think that myth is coming from the fact that JVM is heavy (150MB?), so it takes time to start, and hot-spot needs some iterations on a source code before it can fully apply JIT, but other that that, Java is really good.
Thanks for the feedback! You are right, the demo currently hangs quite a lot on Firefox, Im pretty sure the issue is actually not related with the component itself, I created a issue on the repo to fix it https://github.com/zzarcon/react-circle/issues/10 :)
To further improve things, I would suggest two changes to your webpack config:
1. Use the production version of React. It seems that you are using the slightly slower development version. (In webpack this is done by defining process.env.NODE_ENV = "production" and eliminating dead code afterwards)