I have a requirement in my project. It is an existing project which is developed in Dotnet MVC + Sitecore 9.1, so some part of the page in that project needs to be implemented in react js, for example, calling the service and filtering the data. My question is how we can integrate the react js with this existing project that has MVC + Sitecore 9.1 ? Is there any way to do all this things? Thanks in advance.
Yes - Sitecore JSS
Client Side Embedding
Client Side Embedding is a simple approach for client-side only rendering of ReactJS components, especially if not aiming to have ReactJS drive the page layout.
- JSS is officially supported and maintained for Sitecore 9.1+
- ReactJS.NET and Sitecore.React are not officially supported by Sitecore
- JSS supports the Experience Editor, Sitecore.React also supports the Experience Editor, but does require you to call
FieldRenderer.Render(item, "field")in the controller.
- JSS supports the Tracker (for Analytics, Personalisation and Optimization),
- Sitecore.React also supports the Tracker with no extra code.
- JSS is more scalable as it has headless support, whereas the community modules above are coupled to .NET MVC.
- JSS will have support for Sitecore Experience Accelerator in Sitecore 9.2+
- JSS requires your Sitecore license has this enabled - you will need to check your license details or contact your account manager to confirm.
- Sitecore.React does not require any extra licenses
- Sitecore.React does not have a dependency on node.js.