Create a new component in a Sitecore-first JSS app running in connected mode
When developing Sitecore-first, if you are running the application in connected mode, you can deploy a component registration to your Sitecore instance.
To create a component in the Sitecore-first development workflow in a JSS Next.js app refer to Walkthrough: Creating a new component in a JSS Next.js app using the Sitecore-first development workflow.
The following steps apply to React, Angular, or Vue.js JSS applications.
To create a new component when the application is running in connected mode:
Use the command
jss deploy componentto deploy the component's registration to the Sitecore database.RequestResponseshell
jss deploy component <ComponentName> --allowedPlaceholders=[placeholderName]
Create the component in the JSS app and register it in the Component Factory.
Deploy the app's build artifacts to Sitecore:RequestResponseshell
jss deploy files
Log in to Sitecore and open a route on the app with one of the supported Sitecore editors. Then, add your new component to its allowed placeholder from the UI.