<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://logicwiki.co.uk/index.php?action=history&amp;feed=atom&amp;title=Using_SVG_in_expo_react_native_app</id>
		<title>Using SVG in expo react native app - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://logicwiki.co.uk/index.php?action=history&amp;feed=atom&amp;title=Using_SVG_in_expo_react_native_app"/>
		<link rel="alternate" type="text/html" href="https://logicwiki.co.uk/index.php?title=Using_SVG_in_expo_react_native_app&amp;action=history"/>
		<updated>2026-04-21T18:35:16Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>https://logicwiki.co.uk/index.php?title=Using_SVG_in_expo_react_native_app&amp;diff=2468&amp;oldid=prev</id>
		<title>AliIybar: Created page with &quot;Category:ReactNative Category:expo Category:svg  1 - install these libraties * npx expo install react-native-svg * npm install --save-dev react-native-svg-transfor...&quot;</title>
		<link rel="alternate" type="text/html" href="https://logicwiki.co.uk/index.php?title=Using_SVG_in_expo_react_native_app&amp;diff=2468&amp;oldid=prev"/>
				<updated>2025-05-31T07:31:51Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/index.php?title=Category:ReactNative&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Category:ReactNative (page does not exist)&quot;&gt;Category:ReactNative&lt;/a&gt; &lt;a href=&quot;/index.php?title=Category:Expo&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Category:Expo (page does not exist)&quot;&gt;Category:expo&lt;/a&gt; &lt;a href=&quot;/index.php?title=Category:Svg&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Category:Svg (page does not exist)&quot;&gt;Category:svg&lt;/a&gt;  1 - install these libraties * npx expo install react-native-svg * npm install --save-dev react-native-svg-transfor...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:ReactNative]]&lt;br /&gt;
[[Category:expo]]&lt;br /&gt;
[[Category:svg]]&lt;br /&gt;
&lt;br /&gt;
1 - install these libraties&lt;br /&gt;
* npx expo install react-native-svg&lt;br /&gt;
* npm install --save-dev react-native-svg-transformer&lt;br /&gt;
2 - Add '''metro.config.js''' in the root&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const { getDefaultConfig } = require(&amp;quot;expo/metro-config&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
module.exports = (() =&amp;gt; {&lt;br /&gt;
  const config = getDefaultConfig(__dirname);&lt;br /&gt;
&lt;br /&gt;
  const { transformer, resolver } = config;&lt;br /&gt;
&lt;br /&gt;
  config.transformer = {&lt;br /&gt;
    ...transformer,&lt;br /&gt;
    babelTransformerPath: require.resolve(&amp;quot;react-native-svg-transformer/expo&amp;quot;)&lt;br /&gt;
  };&lt;br /&gt;
  config.resolver = {&lt;br /&gt;
    ...resolver,&lt;br /&gt;
    assetExts: resolver.assetExts.filter((ext) =&amp;gt; ext !== &amp;quot;svg&amp;quot;),&lt;br /&gt;
    sourceExts: [...resolver.sourceExts, &amp;quot;svg&amp;quot;]&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
  return config;&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
3 - if it's a typescript project add '''declarations.d.ts''' in the root&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
declare module &amp;quot;*.svg&amp;quot; {&lt;br /&gt;
  import React from &amp;quot;react&amp;quot;;&lt;br /&gt;
  import { SvgProps } from &amp;quot;react-native-svg&amp;quot;;&lt;br /&gt;
  const content: React.FC&amp;lt;SvgProps&amp;gt;;&lt;br /&gt;
  export default content;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
4 - run the project with '''npx expo start'''&lt;br /&gt;
&lt;br /&gt;
5 - Use like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import Destination from '../../assets/images/svg/destination.svg'&lt;br /&gt;
...&lt;br /&gt;
 &amp;lt;Destination width={100} height={100} /&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>AliIybar</name></author>	</entry>

	</feed>