Discussion NodeJS

react-inlinesvg

react-inlinesvg is a npm package for React, which is convenient when we show svg image on the web pages.

We can simply store svg as files and import it from React component.

Then we can display it using SVG tag.

import SVG from ‘react-inlinesvg’;

import MySVGFile from ‘/path/to/svg-file’;

<SVG src={MySVGFile}/>

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *