Skip to content

Rendering dynamically-sized lists / arrays #834

Answered by amannn
janoschherrmann asked this question in Q&A
Discussion options

You must be logged in to vote

but what if the messages are being generated dynamically by a CMS, and I want to allow variable length inputs?

Can you provide an example of how the CMS output looks like?

From my experience a CMS might allow to add a custom FAQ type (see custom types in Prismic for example) that can then be used on a content page to add multiple items, possibly depending on a locale (locales in Prismic).

So from my understanding, next-intl shouldn't be necessary in this case.

On a related note, you can use rich text formatting to some degree for rendering lists of unknown size:

"list": "<FaqItem><FaqTitle>First title</FaqTitle><FaqDescription>First description</FaqDescription></FaqItem><FaqItem><FaqTit…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@janoschherrmann
Comment options

@amannn
Comment options

@janoschherrmann
Comment options

Answer selected by janoschherrmann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants