Wednesday, August 9, 2017

Sitecore and React – simple integration

I’ve just developed simple application that allow using Sitecore Fields and Data in native React Application with all benefits of Expirience Editor. You can download the source code here

Example of usage:

1) In your Rendering View cshtml file use SitecoreReact helper to register fields and data that you are going to use, in my example: Title, Product Description and some List of data:

2) In react Application add SitecoreReact.js file from js folder and do
 $ npm install html-react-parser

3) Now you can use Field and Data components in you react Application:

It works in Expirience Editor too: