Emiliano-Bucci / react-spring-carousel-js

A new Carousel experience for the modern Web
https://react-spring-carousel-js.emilianobucci.com
80 stars 6 forks source link

Peer dependency warnings #8

Closed josantana closed 2 years ago

josantana commented 3 years ago

Hello there,

The React Spring documentation specifies that it is a cross platform lib, and it gives us the option to install the right version for each project. By instance, I'm using it for web-only projects, so I've installed @react-spring/web.

When I install your package, I receive a lot of warnings because you're using the entire react-spring library:

Peer dependency warnings

Of course, they would not lead me into errors, but it would be nice to avoid it. I've two suggestions:

  1. Build the lib the same way react-spring does, so we can internally rely on the right react-spring version;
  2. Move react-spring to peer dependency on your package.json, just like you do with React and React DOM.

I think the second one is much simpler. Also, it is a basic scenario. I think most people that will use your package already has react-spring as a dependency anyway.

Thanks for your awesome work.

Emiliano-Bucci commented 3 years ago

@josantana Hi, thanks for your feedback and for using the library! :) Regarding your point, I was initially thinking to do something similar. My whole "concern" is that, eventually, for people who don't install react-spring my library won't work; I mean, they would also have to install it manually and in those cases I wanted to avoid them to do it.

Looking this issue -> https://github.com/pmndrs/react-spring/issues/1413, I believe a possible solution could be to rely only on the @react-spring/web package anyway, since this is what this library was created for.

Emiliano-Bucci commented 2 years ago

@josantana Fixed in the new version! :) -> https://react-spring-carousel.emilianobucci.com/