Why no to put svg support in the library? #2021
Unanswered
ivanafanasyeu
asked this question in
Q&A
Replies: 2 comments 7 replies
-
To be precise, react doesn't have that ability by itself. Whatever build chain you use has a plugin to do that. There is https://github.com/jfgodoy/vite-plugin-solid-svg to allow importing SVG files as solid components. If you add it to your build chain, it should work similarly. |
Beta Was this translation helpful? Give feedback.
5 replies
-
You could manually do what the plugin does and wrap the SVG code in template (from solid-js/web) and call The return value in your component. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Exmplain me someone, using svg as icons is a great practice, even React has
Why:
Is working, and the next code is not?
Using svg in images as src is complete bullshit. And it's so common case, something I don't know about svg? It's just html, why I can't import it into the solid jsx?
Beta Was this translation helpful? Give feedback.
All reactions