dangerouslySetInnerHTML?
See original GitHub issueIn React, you can set inner HTML with something like:
<div dangerouslySetInnerHTML={{__html: 'my markup'}} />
but preact doesn’t seem to support this? Any tips on how to achieve something similar?
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
DOM Elements - React
dangerouslySetInnerHTML is React's replacement for using innerHTML in the browser DOM. In general, setting HTML from code is risky because it's easy to ......
Read more >Using dangerouslySetInnerHTML in a React application
dangerouslySetInnerHTML is a property that you can use on HTML elements in a React application to programmatically set their content.
Read more >React.js: Set innerHTML vs dangerouslySetInnerHTML
Since innerHTML is a native method that binds the SVG code directly to the DOM without considering anything. On the other hand, ...
Read more >When to use dangerouslySetInnerHTML in React? - Refine Dev
React dangerouslySetInnerHTML is an HTML property that makes it easy to programmatically set the HTML elements from an external source.
Read more >DangerouslySetInnerHTML in React JS Explained
dangerouslySetInnerHTML is an attribute under DOM elements in React. According to the official documentation, dangerouslySetInnerHTML is React's replacement ...
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 Free
Top 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
You, sir, are a scholar and a gentleman. 😃
Now generally available as of
3.2
.