bmcmahen / react-image-enlarger

Simple medium.com style image zooming with gesture support
https://codesandbox.io/embed/adoring-sun-dz5yj
70 stars 6 forks source link

Drop dependencies #2

Open brunolemos opened 5 years ago

brunolemos commented 5 years ago

I see you added react-spring as a dependency, but that's usually an app dependency, not a library dependency. Maybe the library should be dependency free?

You can see react-spring is making the bundle ~15x bigger: https://bundlephobia.com/result?p=react-image-enlarger@1.0.2

image

bmcmahen commented 5 years ago

Yeah, I'm never really sure if react-spring should be considered a peer dependency or not. It's required either way... and this sort of lib is really difficult to build if you're not using some sort of spring-based animation. Can you explain the benefits of making it a peer dependency instead?