troZee / react-native-svg-view

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unexpected token, syntax error

jacquesdev opened this issue · comments

I have tried to install this lib in order to support svg images, but I get the error below

Simulator Screen Shot - iPhone 11 - 2021-02-15 at 08 00 14

My Code is:

import SvgView from 'react-native-svg-view'
<SvgView
          source={require('Olio/App/Assets/Icons/Svg/PurpleHeart.svg')}
          style={{ height: 24, width: 24 }}
        />

Any ideas?

Hey 👋
Thank you for reporting an issue. Are you using a typescript in your project ?

And the second thing is, this lib does not support local assets for now. This feature is on road map.

More you can find here:
#5

Thanks @troZee, no I am not using typescript in my project