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

+
+```