vemarav / react-native-avatar-crop

Highly customisable <Crop /> component for React Native < 💅 >
https://www.npmjs.com/package/react-native-avatar-crop
MIT License
55 stars 16 forks source link

MaskedView can't be used anywhere else in the project #13

Closed christianrank closed 2 years ago

christianrank commented 2 years ago

Describe the bug This package already registers RNCMaskedView, so it can't be used anywhere else. This shouldn't be the case. Instead it should use the MaskedView component from that package.

To Reproduce Steps to reproduce the behavior:

  1. Use this package
  2. Import MaskedView somewhere else in your project and use it
    import MaskedView from '@react-native-masked-view/masked-view'
    // ...
    <MaskedView />
  3. Get this error: Invariant Violation: Tried to register two views with the same name RNCMaskedView

Expected behavior MaskedView should be usable somewhere else.

Smartphone:

vemarav commented 2 years ago

fixed https://github.com/vemarav/react-native-avatar-crop/commit/491d85b4c57b52ed2785b81cdb28844cfa8e440d, use react-native-avatar-crop v1.3.4