Hi, I want to understand the developer workflow from start to end using Next JS and Slice Machine.
Once I create a slice using slice machine and mock data, do I then need to use the real Prismic API and manually move the slice to use the real data instead of the mock one, or is that handled automatically, if so how?
My understanding is that you copy-paste your slice from your slice machine project to your production product.
Thanks for the help in advance.
Hello @thesrs02, we'll be happy to help you today!
The mock data for each field, along with the Slice simulator allows you to simulate how a Slice will look with live content. This doesn't replace the actual content from your documents.
The local Slices in your front-end code are the Content Modeling of your Custom Types and Slices. All the content is added to the documents. This is done in the UI of your repository.
I'm talking more about how the slice machine/simulator code vs the actual production code is managed.
So I will first create a model of the slice, then create a design for it. Once everything is ready, move this slice to the production code and/or build a query to fetch the slice from Prismic.
Is my understanding correct?
Yes, that is correct. And you can version these changes with git.