I'm enjoying JSS so far but have some general questions about what I perceive as "overhead" work involved in setting up the routes, component definitions and such.
If I want to add a component, this is my understanding of what needs to be done:
- Create the component itself.
- Add entries for the component and its fields to a data/routes yaml.
- Create a Sitecore definition file for the component (ComponentName.sitecore.js)
- Import the component to ComponentFactory and set it.
- We have similar sets of data repeated in the component prop types, the routes yaml, and the definition file.
- Anytime I want to modify a component (say to add a new field), I have to update those three files.
- Initial setup of the routes yamls could be very time consuming, manually filling out multiple pages'/routes' worth of data.
- The main interface for rearranging components and editing their data is a yaml file. Again, this seems potentially time consuming and tedious.
So, I guess my questions are:
- Have I summarized this correctly? Am I over- or understating the amount of overhead?
- Are there existing workflow suggestions to mitigate the overhead? (Code-first sounds like the best workflow to me, but perhaps Sitecore-first would help with this?)
- Are there plans to automate some of this or otherwise reduce the complexity? Perhaps the definitions, for example, could be auto-generated from the yaml and/or component prop types?
And finally, I found this blurb on the JSS documentation site, but don't understand it:
- Can you explain the above and whether there are some possibilities here around what I've been asking?
Sorry for the long question, and thanks in advance. I look forward to working with JSS as it evolves.