paypal / react-engine

a composite render engine for universal (isomorphic) express apps to render both plain react views and react-router views
Apache License 2.0
1.45k stars 130 forks source link

Client side i18n #115

Closed dglozic closed 7 years ago

dglozic commented 8 years ago

It may not be related directly to react-engine, but just to ask - is there a good suggestion on how to integrate i18n with react-engine/react-router isomorphic app? We are currently struggling with loading messages for the appropriate component from the server using i18next library. It is loading messages asynchronously, so for a brief moment our components mounted by react-router render without translation, until the messages arrive and re-render fixes it.

samsel commented 8 years ago

@dglozic In our case, we used yahoo's react-intl. we rendered the component with the appropriate content and then passed the content as props down to the client(happens inherently in react-engine). we didn't take the asynchronous content loading route because we wanted the page to be rendered completely with content on server