879479119 / react-native-shadow

A SVG shadow component powered with react-native-svg,which can provide shadow on Android like iOS ^_^
MIT License
610 stars 82 forks source link

TypeError: Invalid attempt to spread non-iterable instance.In order to be iterable, non-array objects must have a [Symbol.iterator]() method. #49

Open geekayush1812 opened 4 years ago

geekayush1812 commented 4 years ago

import React from 'react'; import {View} from 'react-native'; import {BoxShadow, BorderShadow} from 'react-native-shadow';

function Neumorphic() { const shadowOpt = { width: 100, height: 100, color: '#000', border: 2, radius: 10, opacity: 0.18, x: 2, y: 2, }; const shadowOpt1 = { width: 100, height: 100, color: '#fff', border: 2, radius: 10, opacity: 0.18, x: -2, y: -2, }; const shadowOpt2 = { width: 100, color: '#fff', border: 2, opacity: 0.18, side: 'top', inset: true, }; return ( <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center', position: 'relative', backgroundColor: '#eee', }}> {/*

  </BoxShadow> */}
  <BorderShadow setting={{side: 'bottom'}}>
    <View
      style={{
        width: 100,
        height: 100,
        backgroundColor: '#fefefe',
        borderRadius: 10,
      }}
    />
  </BorderShadow>
</View>

); }

export default Neumorphic;

MichaelKim39 commented 4 years ago

Having the same issue, any help?

brunosantanarj commented 3 years ago

https://github.com/879479119/react-native-shadow/issues/31#issuecomment-636629468 works for me