By default, JSS uses a
jss Layout Service configuration. And when we just created a new Rendering Host from
sitecore.aspnet.gettingstarted template, Rendering Host has
LayoutServicePath setting which is pointing a Layout Service by the following path:
/sitecore/api/layout/render/jss, where the last node in the path is
jss configuration. So here everything works as expected.
But then I have installed SXA. And it has own Layout service configuration which is called
sxa-jss. I assume we need that to be able to use Page and Partial Designs. So, when I was requesting the page from browser directly to the Rendering Host - it was using
jss configuration and all was working fine. But when I tried to open page in Experience Editor - it was using
sxa-jss configuration which is set in the site settings and returning me the
Unknown component 'Component name here'. And when I changed the Rendering Host setting to use
sxa-jss as well - I got the same result as in EE.
So, I found how to solve it. Basically, it appears when Rendering item has spaces in the name. Which seems SXA bug... I just have renamed all my rendering and it became working fine.