Sitecore: Using a JSS React component in an SXA site

905 views Asked by At

If I create a JSS react component and import it into Sitecore, can I add it to my Available Renderings in my SXA site and then add it to a page in my SXA site or vice-versa (i.e. add an SXA component to a page in my JSS Page?) I tried doing that although the component shows up successfully when I try to add the component to my SXA page in Experience Editor, I cannot see the component on the page, after I associate the Data content with it.

1

There are 1 answers

0
theFlyingCoder On

You definitely can combine SXA and JSS, but the most common use case would be at an app level, not necessarily at a component level... As you would normally just build out the component with the framework you are using.

You can look through the docs on managing JSS apps within an SXA site to get more of an idea how it would work Here

Depending on your server setup and taking into account that the Experience Editor behaves very differently with JSS than it would when viewing the live site, I don't think anyone could give you the right direction here.

To get some proper advice and if you are actually doing this the guys in the sitecore slack would be keen to help:

Slack Request Form