react-intl - accessing nested messages

后端 未结 3 1028
夕颜
夕颜 2021-02-19 03:23

I\'m trying to use react-intl package inside an app. The app is rendered on the server so I wrote some code to determine which language to use and serve into

3条回答
  •  别跟我提以往
    2021-02-19 03:44

    react-intl does not support nested messages anymore. If you still want to organize your messages that way, you can use the flat library to correct your messages structure beforehand.

    import flatten from 'flat'
    
    
    

    https://github.com/hughsk/flat

提交回复
热议问题