5

We want to use Sitecore JSS (ReactBased) Framework with Sitecore 9.2 (Integrated mode).

We will have 3 sites that are almost the same but they have their differences in components and content (they will have different domains name too).

So basically, we want to know which is the best approach to have this scenario set up with react JSS solution.

Do we have to make 3 apps with a lot of duplicate code or it is an easier way to do it?

1
  • All JSS sites can use the same app. – Jan Bluemink Sep 25 '19 at 14:09
1

Yes it is feasible to use 1 JSS App to serve multi-site but requires custom implementation.

  1. You need custom code to resolve the site as the layoutServiceHost will point to 1 domain.

  2. You may need to update the site start path to the /sitecore/content and from there you'll need to resolve for the site.

I've talked with Sitecore Experts via Support ticket and Sitecore Slack Channel about this and the best and recommended approach is to use Sitecore 9.2 with JSS 12 and SXA 1.9

SXA 1.9 has the capabilities of managing different JSS App but also allow you to configure multiple sites with a single JSS App. Here is a link about my journey of migrating from JSS to SXA JSS.

On SXA 1.9, the settings item allows you to configure on which app you want to point the JSS App. More information can be found at the SXA Documentation - Managing JSS App

2
  • Thanks! We will try this approach for the moment to see how it will work. – Cristian Carazsan Sep 26 '19 at 11:34
  • I'm interested to hear how you went with this @CristianCarazsan. I tried to setup multisite on Sitecore 9.2, hit an issue with sharing of components between sites (on the JSS side), and then the requirement disappeared so didn't follow through. Now starting a new multisite project and trying to decide the best way forward.. interested in your experience - did you go with SXA? How did it work out for you? – Jeeby Oct 22 '20 at 0:06
2

I will try to answer to @Jeeby's questions:

did you go with SXA?--->No (it may be possible but we haven't use it)

How did it work out for you? ---> We ended up with a single JSS App and 3 sites under /sitecore/content with common components outside of them under one Universal folder. Sitecore Support helped us with sharing components between sites, because it can't be done and they provided a hotfix that made that outside components to be shared.

As for deployments we deploy the JSS App three times (for each site one time).

And another thing is that we go as Sitecore First approach, we don't keep the yml files in our react app. We find it easier in this way to build new components.

In Sitecore our components and renderings are under /Feature not under /Project/Site. We put there only specific components to each site.

Don't hesitate to ask Sitecore for things that don't make sense, some time they can provide a great shortcut like that hotfix.

I hope you will find this information useful and good luck to everyone!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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