Documentation

Read and search through all the Sitecore JSS documentation

Working with JSS in Connected Mode

To create a new component in connected mode:

  1. Determine the placeholder name that the component needs to live in (this placeholder name must be defined in the app root JS or another component's JS, to define where in the HTML source the component will be injected)
  2. Use the jss deploy component <componentName> --allowedPlaceholders=[placeholderName] command to deploy the component's registration to the Sitecore database. This command can also specify data fields that the component needs; use jss deploy component --help for details.
  3. Create the component in the JSS app (this is JS-library-specific; e.g. for React, create a React component and register it with the componentFactory.js)
  4. Deploy the JSS app's build to Sitecore (integrated mode is necessary here so that we can use Experience Editor to add the component to a route). jss deploy files will do this for any app.
  5. Login to Sitecore and open a route on the app with the Experience Editor. You should be able to add your new component to its allowed placeholder from the UI.

Found a problem? Have something to add? Edit this on GitHub