Resources: Importing SVG In React

Geonil Jang·2021년 3월 1일
0

import {ReactComponent as Logo} from "somewhere svg"

This is a new special syntax when importing SVG in React. The ReactComponent import name is special and tells Create React App that you want a React component that renders an SVG, rather than its filename. You can read more about it here, but keep in mind that this is a React library special syntax:

https://facebook.github.io/create-react-app/docs/adding-images-fonts-and-files

profile
takeaways

0개의 댓글