react-native-image-gallery icon indicating copy to clipboard operation
react-native-image-gallery copied to clipboard

Change imports for better tree shaking

Open rdy opened this issue 6 years ago • 0 comments

I've been doing several experiments with tree shaking and react-native bundles. I had a very simple change to this module to fix using it with a tree shaker. Basically, you want to avoid importing the entire react-native import when possible. The code in ViewTransformer is really only using findNodeHandle along with a few components so I imported it directly. This makes it so the tree shaker code I've been using can avoid bringing in all of react-native.

This is just a slightly modification to the way of importing which shouldn't have any adverse side effects.

Thanks!

rdy avatar Apr 06 '18 21:04 rdy