jaredpalmer / awesome-react-render-props

Awesome list of React components with render props
1.37k stars 111 forks source link

Added ReactI18nRouting library #68

Closed benatespina closed 6 years ago

benatespina commented 6 years ago

PR rebased!

benatespina commented 6 years ago

As it says in the documentation:

These strategies are implemented following the render props React's popular pattern. However this technique generates useless boilerplate so, we have decorated providers itself with High Order Component pattern to reduce unneeded code.

You can check inside the codebase that the BrowserIntlProvider strategies are implemented following render prop pattern.

https://github.com/FriendsOfECMAScript/ReactI18nRouting/blob/master/src/component/bridges/ReduxBrowserIntlProvider.js#L76

https://github.com/FriendsOfECMAScript/ReactI18nRouting/blob/master/src/component/bridges/LocalStorageBrowserIntlProvider.js#L53

https://github.com/FriendsOfECMAScript/ReactI18nRouting/blob/master/src/component/bridges/InMemoryBrowserIntlProvider.js#L57

So, if you want to use without HOC, the only way is via render prop.