tanem / react-svg

:art: A React component that injects SVG into the DOM.

Home Page:https://npm.im/react-svg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SVGs partially not injected

frufus opened this issue · comments

Hi,

since we updated our project to version 14 (jumped from version 12) some SVGs don't get injected on first load.
It's a next js project, all SVGs are in the public folder and preprocessed with svgo.
In some cases the same SVG on the same page in different places gets injected in one place, but not the other.
To me it seams like some kind of race condition, but I couldn't figure out the relevant factors.

Only workaround I could find was to disable request cache, which is more of a nasty solution.

Gonna try to set up a repo to show, but maybe I just oversee something?

Thanks in advance.

Hey @frufus, yea sounds like something I should look into. That example repo would be really helpful! 🙏

Closing due to inactivity.