{"action":"created","issue":{"url":"https://api.github.com/repos/ryandrewjohnson/react-localize-redux/issues/128","repository_url":"https://api.github.com/repos/ryandrewjohnson/react-localize-redux","labels_url":"https://api.github.com/repos/ryandrewjohnson/react-localize-redux/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/ryandrewjohnson/react-localize-redux/issues/128/comments","events_url":"https://api.github.com/repos/ryandrewjohnson/react-localize-redux/issues/128/events","html_url":"https://github.com/ryandrewjohnson/react-localize-redux/issues/128","id":359447586,"node_id":"MDU6SXNzdWUzNTk0NDc1ODY=","number":128,"title":"Avoiding code duplication & Implementation with redux","user":{"login":"vaikoovery","id":5166249,"node_id":"MDQ6VXNlcjUxNjYyNDk=","avatar_url":"https://avatars0.githubusercontent.com/u/5166249?v=4","gravatar_id":"","url":"https://api.github.com/users/vaikoovery","html_url":"https://github.com/vaikoovery","followers_url":"https://api.github.com/users/vaikoovery/followers","following_url":"https://api.github.com/users/vaikoovery/following{/other_user}","gists_url":"https://api.github.com/users/vaikoovery/gists{/gist_id}","starred_url":"https://api.github.com/users/vaikoovery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaikoovery/subscriptions","organizations_url":"https://api.github.com/users/vaikoovery/orgs","repos_url":"https://api.github.com/users/vaikoovery/repos","events_url":"https://api.github.com/users/vaikoovery/events{/privacy}","received_events_url":"https://api.github.com/users/vaikoovery/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-12T12:00:57Z","updated_at":"2018-09-21T15:58:33Z","closed_at":null,"author_association":"NONE","body":"First of all, thank you so much for such a nice & simple translator package... loving it. <3\r\n\r\nNot sure whether its a bug, but I'm facing code duplication issue with & withut redux.\r\nA code sample has been made here: https://codesandbox.io/s/wwpznw5mww\r\n\r\nMy concern is about duplicating the code in constructor, when I have more translation files available. i.e.\r\n\r\n    const { userLanguage } = props\r\n    /* I also have this in Form.js */\r\n    this.props.initialize({\r\n      languages, // this is a duplication?\r\n      translation: globalTranslations, // in other place it could change like \"otherTranslations\"\r\n      options: { renderToStaticMarkup, userLanguage }\r\n    })`\r\n\r\nHow do I get rid of it? I literrally has to duplicate it in all functional components, also need to import the relevant files in it.\r\n\r\nPlease advise a better way to integrate it. (I'm a newbie ;))\r\n\r\nI've used `react 16.4.2` and `latest react-localize-redux`.\r\n"},"comment":{"url":"https://api.github.com/repos/ryandrewjohnson/react-localize-redux/issues/comments/423584781","html_url":"https://github.com/ryandrewjohnson/react-localize-redux/issues/128#issuecomment-423584781","issue_url":"https://api.github.com/repos/ryandrewjohnson/react-localize-redux/issues/128","id":423584781,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzU4NDc4MQ==","user":{"login":"vaikoovery","id":5166249,"node_id":"MDQ6VXNlcjUxNjYyNDk=","avatar_url":"https://avatars0.githubusercontent.com/u/5166249?v=4","gravatar_id":"","url":"https://api.github.com/users/vaikoovery","html_url":"https://github.com/vaikoovery","followers_url":"https://api.github.com/users/vaikoovery/followers","following_url":"https://api.github.com/users/vaikoovery/following{/other_user}","gists_url":"https://api.github.com/users/vaikoovery/gists{/gist_id}","starred_url":"https://api.github.com/users/vaikoovery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaikoovery/subscriptions","organizations_url":"https://api.github.com/users/vaikoovery/orgs","repos_url":"https://api.github.com/users/vaikoovery/repos","events_url":"https://api.github.com/users/vaikoovery/events{/privacy}","received_events_url":"https://api.github.com/users/vaikoovery/received_events","type":"User","site_admin":false},"created_at":"2018-09-21T15:58:33Z","updated_at":"2018-09-21T15:58:33Z","author_association":"NONE","body":"The reason why I was using initialize in differrent Components is to use multiple json files for differrent components.\r\n\r\nDo you recommend using all translations in single file and `Initialize` only once? I assumed that the bundle size can be reduced if I use different json files. Please advise."}}
{"actor":{"display_login":"vaikoovery"}}