Can I import an SVG file as react component?

Posted by Prem Tiwari | Updated on

Can I import an SVG file as react component?

You can import SVG directly as component instead of loading it as a file. This feature is available with [email protected] and higher.

Note: Don’t forget about the curly braces in the import.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers