Open JosipPardon opened 2 weeks ago
Thanks for the feedback!
Your solution was in fact considered in https://github.com/amannn/next-intl/issues/611 and is absolutely fine.
However, I went for the render prop way in the docs since it's slightly more flexible IMO:
<p>
)So yes, it's a bit more code up front, but I believe it provides more flexibility without having to think much about it.
I'll leave this open for a bit to see if more users feel this way, would be curious about more opinions!
Link to page
https://next-intl-docs.vercel.app/docs/usage/messages#rich-text-reuse-tags
Describe the problem
Solution described in https://next-intl-docs.vercel.app/docs/usage/messages#rich-text-reuse-tags is very complex. Much simpler and better solution is this:
and then:
Also, docs don't describe how to combine default tags with specific ones. Solution is this: