APSL / redux-i18n

A simple and powerful package for translate your react applications using react-redux.
MIT License
233 stars 52 forks source link

Use React new context API #82

Open p10ns11y opened 6 years ago

p10ns11y commented 6 years ago

Consider this work as beta. ie., I need inputs/feedback from the maintainers what to do with tests. Right now I have added only one

zhihil commented 5 years ago

This would be a valuable change. I am working on a React app using Typescript and type-checking prohibits the use of React's legacy context api, i.e., contextTypes.

I'm getting this error:

screen shot 2019-02-20 at 9 45 22 am

Supporting the new React context api would make it easier to work with redux-i18n out of the box with Typescript.

Are there any plans to merge these changes in?

EDIT: The solution was simple. Make .contextTypes a static property of the class you want to subscribe to redux-i18n's context.

JosephBrooksbank commented 3 years ago

Are there any plans to merge this in? React strongly advocates against the use of legacy context