Reputation: 1667
I have encountered this error after installing react-native-svg
. I have all svg icons in a separate .js
file and calling them as follows,
<Icons name={'dot'} style={{height:4, width:4, marginRight:10}} color={"#D8D8D8"}/>
as per this Solution, What ever the values I have given in style object are integers only. But still I am facing this error.
As per this git Solution, some one is asking to downgrade and some one is asking to upgrade react native. But not sure which one gives permanent fix to this error.
Can somebody please let me know root cause of the error and permanent fix for this. Thank You.
Upvotes: 4
Views: 4993
Reputation: 585
as i know this issue happens when you set width and height style to Icon component
you should set size
prop to <Icon />
your code should be Like this :
<Icons name={'dot'} size={15} style={{marginRight:10}} color={"#D8D8D8"}/>
Upvotes: 1