1

I have an existing React.js application and I want to integrate it with Sitecore to provide CMS features.

Is it possible to integrate the existing React.js App with Sitecore 10.2 with Headless support? Do I need to go with Next.js and rewrite React app?

2 Answers 2

1

The short answer to this is yes, with Sitecore headless, you are able to call the headless APIs from any application that can make a web request. So, your react application can make calls to the API to get content and layout data. There is no hard requirement for Next.js, if you want the features of Next.js, then go ahead and re-build it there. But you do not need to do this.

However, depending on what functionality you want to support, you may need to make changes to your react code.

If you want to have inline editing support in the Experience Editor and/or support for adding/removing components or page composition in the Experience Editor, you should refactor your application to use the Sitecore JSS SDK. You can probably still use all your existing react components and just modify them to use the JSS SDK for rendering fields. That would enable inline editing.

For page composition, you will probably need to re-build the app using the JSS SDK, and just pull in your existing component code, modifying them to use the JSS SDK.

So, you have some options, as for the "best way" to do this, we can't answer that here, and that really is not what SSE is for anyway, that would be opinionated. Choose the path that best fits your requirements, budget and timeline.

1
0

You can use any of these based on your choice and requirement. If it's a brand new application then you can go for NextJS as it is high on market as of now and provide performance and SEO benefit but if you have an existing react app and want minimum update then you choose React for your headless development.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.