You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.
Hi,
I'm using react-art to display SVGs in the following way,
I open the svg file in a text editor and copy its "path" string to a constant in my react-native app.
my icon component render function looks like this:
However, in order to share code with my web react app, I would prefer importing the svg as a file (ie. src="/icon.svg" or so) and not take the string from the file and hard-code it.
Is there a proper way of doing this? Or am I looking at this the wrong way?
Cheers,
Iftach
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I'm using react-art to display SVGs in the following way,
I open the svg file in a text editor and copy its "path" string to a constant in my react-native app.
my icon component render function looks like this:
where
this.props.path
is the path of the svg.However, in order to share code with my web react app, I would prefer importing the svg as a file (ie. src="/icon.svg" or so) and not take the string from the file and hard-code it.
Is there a proper way of doing this? Or am I looking at this the wrong way?
Cheers,
Iftach
The text was updated successfully, but these errors were encountered: