From 2beb8fadde5b39a5b956fdf3f07de900083364a0 Mon Sep 17 00:00:00 2001 From: steven-mercatante Date: Mon, 5 Feb 2018 21:27:02 -0500 Subject: [PATCH] Update docs for adding custom JavaScript to home.js --- docs/docs/custom-html.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/docs/custom-html.md b/docs/docs/custom-html.md index 768922b06bbc7..6a07bf74f3191 100644 --- a/docs/docs/custom-html.md +++ b/docs/docs/custom-html.md @@ -40,3 +40,18 @@ If you see this error: `Uncaught Error: _registerComponent(...): Target containe dangerouslySetInnerHTML={{ __html: this.props.body }} /> ``` + +### Adding custom JavaScript + +You can add custom JavaScript to your HTML document by using React's [dangerouslySetInnerHTML](https://reactjs.org/docs/dom-elements.html#dangerouslysetinnerhtml) attribute. + +```jsx +