GuitarRich / sitecore.react

A ReactJS module for building Sitecore components with React
MIT License
36 stars 22 forks source link

Component Name should not have "." , as in JS engine its treated as s… #9

Closed mknayak closed 7 years ago

mknayak commented 7 years ago

…eparate object. Components.SampleReactRendering will throw error as we don't have an object with name Components.

Component should have name like Components_SampleReactRendering As in the code we are adding "Components" to actual name. Else to keep it simple just use "ComponentName" with out prefix.

GuitarRich commented 7 years ago

For Sitecore.React to work right now - you need to add all your jsx components to a global object called Components - this is because ReactJS.Net requires global access to the components for server side rendering.

It will be a future enhancement to make the name of that global object configurable.