diff --git a/README.md b/README.md index 1c41422..c269a2b 100644 --- a/README.md +++ b/README.md @@ -101,3 +101,20 @@ The above outputs the following HTML: ``` + +### dangerouslySetInnerHTML +As with React and Preact you can provide the prop `dangerouslySetInnerHTML` with an object containing `{__html: '

HTML Content

'}` to directly set the HTML content of an element. However, this is not advisable as it will ignore any children passed to it, and removes the benefits of JSX. + +Here is an example: +```js +
HTML Content'}}> + Overwritten content! +
+``` + +The above outputs the following HTML: +```html +
+

HTML Content

+
+``` pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy