У меня была проблема инвариантное нарушение при обычной установке, поэтому я импортировал скрипт как компонент и использовал его, как показано ниже
import ColorWheel from '../../components/ColorWheel';
<View style={{flexDirection:'row', justifyContent: 'center'}}>
<View style={{width:'50%', paddingHorizontal: 5}}>
<Label style={{fontSize: 14, fontWeight: 'bold', paddingVertical: 5, textAlign: 'center'}}>COLOR (IF Any)</Label>
<ColorWheel
initialColor="#ffffff"
onColorChange={color => this.onColorChange(color)}
thumbStyle={{ height: 30, width: 30, borderRadius: 30}}
style={{ height: 180, width: 180, elevation: 100000}}
/>
</View>
</View>
<View style={{flexDirection:'row', justifyContent: 'center'}}>
<View style={{width:'50%', paddingHorizontal: 5}}>
<Label style={{fontSize: 14, fontWeight: 'bold', paddingVertical: 5, textAlign: 'center'}}>COLOR (IF Any)</Label>
<ColorWheel
initialColor="#ffffff"
onColorChange={color => this.onColorChange1(color)}
thumbStyle={{ height: 30, width: 30, borderRadius: 30}}
style={{ height: 180, width: 180, elevation: 100000}}
/>
</View>
</View>
Он отлично работает, если используется одиночный раз, но мне нужно использовать его несколько раз (5 раз для 5 разных цветов). После этого он перестает работать. Ничего не происходит, если щелкнуть изображение или перетащить большой палец.
Заранее спасибо.