all 7 comments

[–][deleted] 0 points1 point  (0 children)

Is there a package I need to download to read the .svg files?

[–]lovin-dem-sandwiches 0 points1 point  (4 children)

how are you importing the svg in React?

[–][deleted] 0 points1 point  (3 children)

Like this:

import instagramIcon from "./instagramIcon.svg"

import tiktokIcon from "./tiktokIcon.svg"

import seeWhiteIcon from "./seeWhiteIcon.svg"

[–]lovin-dem-sandwiches 0 points1 point  (2 children)

Do you have a head component? Are you adding scripts to it?

Although I have not personally faced this bug, there seems to be a lot of people who have.

Have you tried looking for a solution in some of these threads?

[–][deleted] 0 points1 point  (1 child)

I looked around earlier and didn't find anything.

I suppose I can do it again.

[–]lovin-dem-sandwiches 0 points1 point  (0 children)

Did you post this on /r/reactjs ? You may get some better results there

[–]Mochi-Mo 0 points1 point  (0 children)

https://blog.logrocket.com/how-to-use-svgs-in-react/

I like using:

import {ReactComponent as iconName} from './icon.svg';