{"action":"created","comment":{"url":"https://api.github.com/repos/marmelab/marmelab.github.io/pulls/comments/45844578","id":45844578,"diff_hunk":"@@ -0,0 +1,392 @@\n+Meteor with Webpack, React and Redux\n+===================\n+\n+# Introduction\n+In case you haven't heard about those technologies, here are some links and a very brief introduction to them.\n+\n+1. Meteor: https://www.meteor.com\n+Meteor has been my platform of choice to quickly develop real time web applications which can easily be compiled as mobile applications too, thanks to phonegap integration.\n+\n+2. React: https://facebook.github.io/react/\n+React has changed the way we architecture our client applications by providing a fast and predictable way to organize our code into components.\n+\n+3. Redux: http://redux.js.org/\n+Redux has made the Flux architecture a lot simpler with a predictable state container, thus providing a single source of truth for the whole app, simplifying the way we reason about it. If you don't use it yet for your react applications, I suggest you watch https://egghead.io/series/getting-started-with-redux.\n+\n+4. Webpack: https://webpack.github.io/\n+Webpack has simplified the way we structure our code, making bundling a bliss.\n+\n+# The Meteor problem\n+I've been a big fan of the Meteor platform as it allowed me to build complex applications very quickly as a single developer. That doesn't mean it's a perfect tool. Let's review my personal pros and cons about it:\n+\n+**Pros**\n+- Publications and subscriptions mechanisms\n+\t- Simple way to define security rules on those publications\n+\t- DDP protocol allowing easy client synchronization\n+- Authentication mechanisms (login/pwd, oauth)\n+- Isomorphic way to query data\n+- Some really good isomorphic packages are available from the community\n+\n+**Cons**\n+- Uses its own package manager and make **npm** usage possible but difficult (either use ported packages which are often out of date, or use an npm package manager which doesn't allow you to use semver wildcards)\n+- Uses its own building tool which is slower than webpack and is not as extensible\n+- Forces you to use global variables and old school namespaces\n+- **es6** recent integration does not include `import` and `export`\n+\n+*MDG* (the company behind Meteor) is aware of those problems and is working on it as seen on their forum [here](https://forums.meteor.com/t/next-steps-on-blaze-and-the-view-layer/13561). Fortunately, some Meteor developers have worked on ways to improve this.\n+\n+# How can we use those technologies together\n+I'm aware of two projects trying to address the Meteor/Webpack problem:\n+\n+1. https://github.com/thereactivestack/kickstart by **eXon**\n+2. https://github.com/jedwards1211/meteor-webpack-react by **jedwards**\n+\n+I've decided to go with jedwards's project as it allows me to use npm the standard way. The project is more difficult to apprehend tough, especially for Meteor developers used to run some simple commands to get things working.\n+\n+Using jedwards's project, you don't depend anymore on Meteor integration of React. You can use the last version of React as you would on a standard node application. You can use webpack client and server side, allowing easy standard testing using karma/jasmine or mocha, hot reload and all the niceties you're used to with webpack.\n+\n+# Redux\n+Making **Meteor** work with **Redux** is pretty easy. Let's begin with a simple example: authentication with google.\n+\n+### Configure Meteor authentication\n+Proceed as usual:\n+\n+  - add the following Meteor packages: `accounts-google`, `service-configuration`\n+  - get the api key and secret from your google console and put them in your Meteor settings file (`settings.json`)\n+    ``` json","path":"blog/_posts/2015-11-24-meteor-webpack-react-redux.md","position":null,"original_position":56,"commit_id":"240fbcc22faa3eee8ac3bc6fb96845602fc5e5ac","original_commit_id":"abdf5aed39d654787190eae8ee78103b87b863de","user":{"login":"fzaninotto","id":99944,"avatar_url":"https://avatars.githubusercontent.com/u/99944?v=3","gravatar_id":"","url":"https://api.github.com/users/fzaninotto","html_url":"https://github.com/fzaninotto","followers_url":"https://api.github.com/users/fzaninotto/followers","following_url":"https://api.github.com/users/fzaninotto/following{/other_user}","gists_url":"https://api.github.com/users/fzaninotto/gists{/gist_id}","starred_url":"https://api.github.com/users/fzaninotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzaninotto/subscriptions","organizations_url":"https://api.github.com/users/fzaninotto/orgs","repos_url":"https://api.github.com/users/fzaninotto/repos","events_url":"https://api.github.com/users/fzaninotto/events{/privacy}","received_events_url":"https://api.github.com/users/fzaninotto/received_events","type":"User","site_admin":false},"body":"You have to check the Jekyll rendered version","created_at":"2015-11-25T09:26:29Z","updated_at":"2015-11-25T09:26:29Z","html_url":"https://github.com/marmelab/marmelab.github.io/pull/79#discussion_r45844578","pull_request_url":"https://api.github.com/repos/marmelab/marmelab.github.io/pulls/79","_links":{"self":{"href":"https://api.github.com/repos/marmelab/marmelab.github.io/pulls/comments/45844578"},"html":{"href":"https://github.com/marmelab/marmelab.github.io/pull/79#discussion_r45844578"},"pull_request":{"href":"https://api.github.com/repos/marmelab/marmelab.github.io/pulls/79"}}},"pull_request":{"url":"https://api.github.com/repos/marmelab/marmelab.github.io/pulls/79","id":51667685,"html_url":"https://github.com/marmelab/marmelab.github.io/pull/79","diff_url":"https://github.com/marmelab/marmelab.github.io/pull/79.diff","patch_url":"https://github.com/marmelab/marmelab.github.io/pull/79.patch","issue_url":"https://api.github.com/repos/marmelab/marmelab.github.io/issues/79","number":79,"state":"open","locked":false,"title":"[WIP] Meteor Webpack React Redux","user":{"login":"djhi","id":1122076,"avatar_url":"https://avatars.githubusercontent.com/u/1122076?v=3","gravatar_id":"","url":"https://api.github.com/users/djhi","html_url":"https://github.com/djhi","followers_url":"https://api.github.com/users/djhi/followers","following_url":"https://api.github.com/users/djhi/following{/other_user}","gists_url":"https://api.github.com/users/djhi/gists{/gist_id}","starred_url":"https://api.github.com/users/djhi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djhi/subscriptions","organizations_url":"https://api.github.com/users/djhi/orgs","repos_url":"https://api.github.com/users/djhi/repos","events_url":"https://api.github.com/users/djhi/events{/privacy}","received_events_url":"https://api.github.com/users/djhi/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-24T14:42:07Z","updated_at":"2015-11-25T09:26:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f93125bf68724507e0aa15e6f264d11f5c03e72e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/marmelab/marmelab.github.io/pulls/79/commits","review_comments_url":"https://api.github.com/repos/marmelab/marmelab.github.io/pulls/79/comments","review_comment_url":"https://api.github.com/repos/marmelab/marmelab.github.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/marmelab/marmelab.github.io/issues/79/comments","statuses_url":"https://api.github.com/repos/marmelab/marmelab.github.io/statuses/240fbcc22faa3eee8ac3bc6fb96845602fc5e5ac","head":{"label":"marmelab:meteor_webpack_react_redux","ref":"meteor_webpack_react_redux","sha":"240fbcc22faa3eee8ac3bc6fb96845602fc5e5ac","user":{"login":"marmelab","id":3116319,"avatar_url":"https://avatars.githubusercontent.com/u/3116319?v=3","gravatar_id":"","url":"https://api.github.com/users/marmelab","html_url":"https://github.com/marmelab","followers_url":"https://api.github.com/users/marmelab/followers","following_url":"https://api.github.com/users/marmelab/following{/other_user}","gists_url":"https://api.github.com/users/marmelab/gists{/gist_id}","starred_url":"https://api.github.com/users/marmelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marmelab/subscriptions","organizations_url":"https://api.github.com/users/marmelab/orgs","repos_url":"https://api.github.com/users/marmelab/repos","events_url":"https://api.github.com/users/marmelab/events{/privacy}","received_events_url":"https://api.github.com/users/marmelab/received_events","type":"Organization","site_admin":false},"repo":{"id":13563896,"name":"marmelab.github.io","full_name":"marmelab/marmelab.github.io","owner":{"login":"marmelab","id":3116319,"avatar_url":"https://avatars.githubusercontent.com/u/3116319?v=3","gravatar_id":"","url":"https://api.github.com/users/marmelab","html_url":"https://github.com/marmelab","followers_url":"https://api.github.com/users/marmelab/followers","following_url":"https://api.github.com/users/marmelab/following{/other_user}","gists_url":"https://api.github.com/users/marmelab/gists{/gist_id}","starred_url":"https://api.github.com/users/marmelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marmelab/subscriptions","organizations_url":"https://api.github.com/users/marmelab/orgs","repos_url":"https://api.github.com/users/marmelab/repos","events_url":"https://api.github.com/users/marmelab/events{/privacy}","received_events_url":"https://api.github.com/users/marmelab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/marmelab/marmelab.github.io","description":"marmelab.com website","fork":false,"url":"https://api.github.com/repos/marmelab/marmelab.github.io","forks_url":"https://api.github.com/repos/marmelab/marmelab.github.io/forks","keys_url":"https://api.github.com/repos/marmelab/marmelab.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marmelab/marmelab.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marmelab/marmelab.github.io/teams","hooks_url":"https://api.github.com/repos/marmelab/marmelab.github.io/hooks","issue_events_url":"https://api.github.com/repos/marmelab/marmelab.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/marmelab/marmelab.github.io/events","assignees_url":"https://api.github.com/repos/marmelab/marmelab.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/marmelab/marmelab.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/marmelab/marmelab.github.io/tags","blobs_url":"https://api.github.com/repos/marmelab/marmelab.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marmelab/marmelab.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marmelab/marmelab.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/marmelab/marmelab.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marmelab/marmelab.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/marmelab/marmelab.github.io/languages","stargazers_url":"https://api.github.com/repos/marmelab/marmelab.github.io/stargazers","contributors_url":"https://api.github.com/repos/marmelab/marmelab.github.io/contributors","subscribers_url":"https://api.github.com/repos/marmelab/marmelab.github.io/subscribers","subscription_url":"https://api.github.com/repos/marmelab/marmelab.github.io/subscription","commits_url":"https://api.github.com/repos/marmelab/marmelab.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/marmelab/marmelab.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/marmelab/marmelab.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/marmelab/marmelab.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/marmelab/marmelab.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/marmelab/marmelab.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marmelab/marmelab.github.io/merges","archive_url":"https://api.github.com/repos/marmelab/marmelab.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marmelab/marmelab.github.io/downloads","issues_url":"https://api.github.com/repos/marmelab/marmelab.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/marmelab/marmelab.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/marmelab/marmelab.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/marmelab/marmelab.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marmelab/marmelab.github.io/labels{/name}","releases_url":"https://api.github.com/repos/marmelab/marmelab.github.io/releases{/id}","created_at":"2013-10-14T14:41:40Z","updated_at":"2015-10-30T14:39:19Z","pushed_at":"2015-11-25T08:14:09Z","git_url":"git://github.com/marmelab/marmelab.github.io.git","ssh_url":"git@github.com:marmelab/marmelab.github.io.git","clone_url":"https://github.com/marmelab/marmelab.github.io.git","svn_url":"https://github.com/marmelab/marmelab.github.io","homepage":"marmelab.com","size":36790,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":2,"default_branch":"master"}},"base":{"label":"marmelab:master","ref":"master","sha":"d6b6cba758885d95a6976e1a2d347f074802a1e7","user":{"login":"marmelab","id":3116319,"avatar_url":"https://avatars.githubusercontent.com/u/3116319?v=3","gravatar_id":"","url":"https://api.github.com/users/marmelab","html_url":"https://github.com/marmelab","followers_url":"https://api.github.com/users/marmelab/followers","following_url":"https://api.github.com/users/marmelab/following{/other_user}","gists_url":"https://api.github.com/users/marmelab/gists{/gist_id}","starred_url":"https://api.github.com/users/marmelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marmelab/subscriptions","organizations_url":"https://api.github.com/users/marmelab/orgs","repos_url":"https://api.github.com/users/marmelab/repos","events_url":"https://api.github.com/users/marmelab/events{/privacy}","received_events_url":"https://api.github.com/users/marmelab/received_events","type":"Organization","site_admin":false},"repo":{"id":13563896,"name":"marmelab.github.io","full_name":"marmelab/marmelab.github.io","owner":{"login":"marmelab","id":3116319,"avatar_url":"https://avatars.githubusercontent.com/u/3116319?v=3","gravatar_id":"","url":"https://api.github.com/users/marmelab","html_url":"https://github.com/marmelab","followers_url":"https://api.github.com/users/marmelab/followers","following_url":"https://api.github.com/users/marmelab/following{/other_user}","gists_url":"https://api.github.com/users/marmelab/gists{/gist_id}","starred_url":"https://api.github.com/users/marmelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marmelab/subscriptions","organizations_url":"https://api.github.com/users/marmelab/orgs","repos_url":"https://api.github.com/users/marmelab/repos","events_url":"https://api.github.com/users/marmelab/events{/privacy}","received_events_url":"https://api.github.com/users/marmelab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/marmelab/marmelab.github.io","description":"marmelab.com website","fork":false,"url":"https://api.github.com/repos/marmelab/marmelab.github.io","forks_url":"https://api.github.com/repos/marmelab/marmelab.github.io/forks","keys_url":"https://api.github.com/repos/marmelab/marmelab.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marmelab/marmelab.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marmelab/marmelab.github.io/teams","hooks_url":"https://api.github.com/repos/marmelab/marmelab.github.io/hooks","issue_events_url":"https://api.github.com/repos/marmelab/marmelab.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/marmelab/marmelab.github.io/events","assignees_url":"https://api.github.com/repos/marmelab/marmelab.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/marmelab/marmelab.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/marmelab/marmelab.github.io/tags","blobs_url":"https://api.github.com/repos/marmelab/marmelab.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marmelab/marmelab.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marmelab/marmelab.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/marmelab/marmelab.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marmelab/marmelab.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/marmelab/marmelab.github.io/languages","stargazers_url":"https://api.github.com/repos/marmelab/marmelab.github.io/stargazers","contributors_url":"https://api.github.com/repos/marmelab/marmelab.github.io/contributors","subscribers_url":"https://api.github.com/repos/marmelab/marmelab.github.io/subscribers","subscription_url":"https://api.github.com/repos/marmelab/marmelab.github.io/subscription","commits_url":"https://api.github.com/repos/marmelab/marmelab.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/marmelab/marmelab.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/marmelab/marmelab.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/marmelab/marmelab.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/marmelab/marmelab.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/marmelab/marmelab.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marmelab/marmelab.github.io/merges","archive_url":"https://api.github.com/repos/marmelab/marmelab.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marmelab/marmelab.github.io/downloads","issues_url":"https://api.github.com/repos/marmelab/marmelab.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/marmelab/marmelab.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/marmelab/marmelab.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/marmelab/marmelab.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marmelab/marmelab.github.io/labels{/name}","releases_url":"https://api.github.com/repos/marmelab/marmelab.github.io/releases{/id}","created_at":"2013-10-14T14:41:40Z","updated_at":"2015-10-30T14:39:19Z","pushed_at":"2015-11-25T08:14:09Z","git_url":"git://github.com/marmelab/marmelab.github.io.git","ssh_url":"git@github.com:marmelab/marmelab.github.io.git","clone_url":"https://github.com/marmelab/marmelab.github.io.git","svn_url":"https://github.com/marmelab/marmelab.github.io","homepage":"marmelab.com","size":36790,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/marmelab/marmelab.github.io/pulls/79"},"html":{"href":"https://github.com/marmelab/marmelab.github.io/pull/79"},"issue":{"href":"https://api.github.com/repos/marmelab/marmelab.github.io/issues/79"},"comments":{"href":"https://api.github.com/repos/marmelab/marmelab.github.io/issues/79/comments"},"review_comments":{"href":"https://api.github.com/repos/marmelab/marmelab.github.io/pulls/79/comments"},"review_comment":{"href":"https://api.github.com/repos/marmelab/marmelab.github.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/marmelab/marmelab.github.io/pulls/79/commits"},"statuses":{"href":"https://api.github.com/repos/marmelab/marmelab.github.io/statuses/240fbcc22faa3eee8ac3bc6fb96845602fc5e5ac"}}}}