Hi community! Hope doing greath.
I'm trying to improve the code of an application (NextJs) about how storage DATA fetched by Prismic, e.g in a page. Let me give you a quickly example.
I'm saving this data in this variables:
Then will be used in the COMPONENT (the page in this case).
But if we want to add a NEW PARAGRAPH (third_paragraph) this will broken the code because the next nodes from PRISMIC going to change. Or maybe you want to delete the
cta_primary = slices.primary.cta_label and the
const cta_secondary = slices.primary.cta_label is not going to be 7, now is 6.
How do you handle this type of situations? Somone have experience dealing with this situation? How is the best way to storage the info from PRISMIC in our NextJs project?