Does this work with React?
See original GitHub issueI’m trying to do something like:
import SVGInject from "@iconfu/svg-inject";
function Test() {
return (
<div>
<img
src={MySvg}
onLoad={SVGInject(this)}
/>
</div>
);
}
Doesn’t seem to be doing anything. I don’t get an error, but the svg is still the same, and if I inspect it in console, it’s still img
instead of svg
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
React.js (Introduction and Working) - GeeksforGeeks
It defines the logical structure of documents and the way a document is accessed and manipulated.). So, to make it faster, React implements...
Read more >How React works under the hood - freeCodeCamp
React allows you to effectively re-construct your DOM in JavaScript and push only those changes to the DOM which have actually occurred.
Read more >What Is React and How Does It Actually Work? - Hostinger
React lets you reuse components that have been developed into other applications. Since ReactJS is open source, it's possible to pre-build components, cutting ......
Read more >A Beginner's Guide to React: How does React work? - Medium
React is a JavaScript library (not a framework) that creates user interfaces (UIs) in a predictable and efficient way using declarative code.
Read more >Tutorial: Intro to React
React is a declarative, efficient, and flexible JavaScript library for building user interfaces. It lets you compose complex UIs from small and isolated...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That didn’t work for me, but
onLoad={(e) => SVGInject(e.target)}
did.@Audreymlgm Nope, I’m not using this repo and I’m just using the
<svg>...</svg>
html tag