The simple example above could be done with .rich() or .markup(), but imagine instead of a simple <dl> list, we are passing props to components, etc. There is also the useMessages() hook, but that is extremely manual and way less convenient than having a .object() function which could do it automatically.
Is your feature request related to a problem? Please describe.
I would like to be able to retrieve translated objects and arrays. See the feature from i18next: https://www.i18next.com/translation-function/objects-and-arrays
Describe the solution you'd like
Perhaps the
t
object could have a.object()
function. For example:en.json
component.tsx
Describe alternatives you've considered
The simple example above could be done with
.rich()
or.markup()
, but imagine instead of a simple<dl>
list, we are passing props to components, etc. There is also theuseMessages()
hook, but that is extremely manual and way less convenient than having a.object()
function which could do it automatically.