Tiqa / redux-polyglot

Polyglot.js bindings for Redux
MIT License
58 stars 13 forks source link

getLocale/getPhrases callback can be synchronous or asynchronous. #16

Closed guillaumearm closed 7 years ago

guillaumearm commented 7 years ago

for v1.2

today, getLocale() and getPhrases() callback signatures are:

getLocale :: Action -> String
getPhrases :: String -> Promise of Object

after a nice PR, this would be:

getLocale :: Action -> (String | Promise of String)
getPhrases :: String -> (Object | Promise of Object)

careful to be backward compatible.