Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

import svg as react component

import React from 'react';
import { ReactComponent as YourSvg } from './YourSvg.svg';

const MyComponent = () => {
    return(
        <YourSvg/>
    );
}

export default MyComponent ;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #import #svg #react #component
ADD COMMENT
Topic
Name
9+8 =