---
title: "Discussion on \"The easiest way to add SVG icons in React\" | Hashnode"
description: "Discussion on \"The easiest way to add SVG icons in React\". SVG images can be used a couple different ways in react, this is my favorite option.\nI create a file for the svg, and make it into a JSX component.\nexport default function FacebookSvg() {\n    return (<div>\n        <svg ... />\n    </div>\n    )\n}\n\nSimp..."
url: "https://hashnode.com/posts/the-easiest-way-to-add-svg-icons-in-react/670503f0007ecb5307b239ef"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [The easiest way to add SVG icons in React](https://blog.skorpen.com/the-easiest-way-to-add-svg-icons-in-react?utm_source=hashnode&utm_medium=feed)

SVG images can be used a couple different ways in react, this is my favorite option. I create a file for the svg, and make it into a JSX component. export default function FacebookSvg() { return (<div> <svg ... /> </div> ) } Simp...

Oct 8, 2024 · 2 min read · blog.skorpen.com  
Read the article

-   [#svg](https://hashnode.com/tag/svg)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#icon](https://hashnode.com/tag/icon)

## Written by

[Stefan Skorpen](https://hashnode.com/@skorpio)

@skorpio · Norway

  
[View profile](https://hashnode.com/@skorpio)

Fullstack developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
