sightly+React | Community
Skip to main content
rk39193348
Level 4
February 19, 2017

sightly+React

  • February 19, 2017
  • 1 reply
  • 5467 views

Hi,

Can anyone share a sample code which contains sightly and react js. A component which contains sightly and react js can anyone please share?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Naveen_AEM_dev
Level 4
February 19, 2017

This post is a detailed step by step guide (steps sample code et al) for integrating AEM with React JS - https://sinnerschrader.github.io/aem-react/

Naveen

rk39193348
Level 4
February 19, 2017

I just want to print 'Hello' in AEM page using react. I am adding the below script but it is not printing in the page. Can you please help?

<script>
React.render("hello", document.getElementById("app"));
</script>

rk39193348
Level 4
February 20, 2017

The below code I have in sightly component, it is not printing "hello world" in the page. Can anyone please suggest??

<script>
var element = <h1>Hello, world</h1>;
ReactDOM.render(
  element,
  document.getElementById('root')
);
</script>
<div id="root"></div>
hello