(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| const Twit = Meteor.npmRequire('twit'); | |
| Accounts.registerLoginHandler('twitter', function(params) { | |
| const data = params.twitter; | |
| // If this isn't twitter login then we don't care about it. No need to proceed. | |
| if (!data) { | |
| return undefined; | |
| } |
| //After working on the backend for a while, I started to continue working on my front end, | |
| //I revisited my redux “cache” store and I made this improvement that made my life a lot easier. | |
| //In my project for example, some collections i need to get the document by id, some by slug, some by username, and etc. | |
| //If I need to account for those cases I had to make new action creators/types, for different entities. | |
| //This is very frustrating as it makes the code less dry and leads to more boilerplate. | |
| //Then what I realized was, I can just pass a “index” option for my insert action creators!(which defaults to “id") | |
| //Actions |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| # Change YOUR_TOKEN to your prerender token | |
| # Change example.com (server_name) to your website url | |
| # Change /path/to/your/root to the correct value | |
| server { | |
| listen 80; | |
| server_name example.com; | |
| root /path/to/your/root; | |
| index index.html; |
| Template.googleAnalytics.rendered = function() { | |
| new GA('UA-111-1', 'my-account-name'); | |
| } | |
| GA = function(code, account) { | |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
| m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
| })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |