question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dangerouslySetInnerHTML?

See original GitHub issue

Is there an equivalent to react’s dangerouslySetInnerHTML? I’m currently using onCreate{e => e.innerHTML = '...'} for this purpose.

It’s not a good solution though, since it flickers when updating.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
jorgebucarancommented, Mar 25, 2017

@dodekeract It’s difficult to process this issue as it’s not clear what should be done. If you want to change the API, you must provide an example where the current API falls short, like #117 led to #141.

1reaction
jacobtippcommented, Mar 24, 2017

I know Vue.js uses a v-html directive which is basically doing the same thing. Seems like a common edge case that should have it’s own method or at least documented on how to accomplish it.

Read more comments on GitHub >

github_iconTop 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 >
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 >
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found