November 12, 2017
Anyone tested out Lightroom CC?
Anyone tested out Lightroom CC?
The only way to make sure I see everything going on at Micro.blog I have found so far, is to add my timeline feed to Feedwrangler.
Most React components are written something like this
I personally think this is very verbose, compared to what it has to be. Because just because most people use regular functions inside their ES6 classes, doesn’t mean you have to. You might disagree, but all the methods I define inside a component should either be moved to some utility file or they need to interact with the components ‘this’.<br /> The way I write React Components these days, if they aren’t stateless, is written something like this:
The big difference between the two is that I have ditched the constructor, because I’m only using it to set the default state and binding the functions. Then all the methods in the previous class have been replaced by arrow functions that use the expression syntax. Which removes some lines with brackets and a return statement.<br /> I personally think the latter versjon looks a lot better; or at least a lot cleaner. There are less "stuff". And I’m going to start re-writing a lot of react code to follow this form, and everything new I write will follow this form. I could probably remove many hundred lines of code just in removing brackets, return and unneeded binds and constructors in my work projects.
Just got my my new Apple Silicone case for my 8 Plus. It looks good, feels good, adds protection without too much bolk.
I personally think that Apple makes the three best cases for iPhone. The Silicone and the Leather Case is without doubt the best general case, and the Smart Battery Case is awesome; if you want a battery case.
Most of the cases I see out there looks pretty bad. Big and or ugly.
When it comes to the case or not question, I think that there was no need for a case, unless you needed extra battery before the 6 and 6 Plus.
But I think you need one with anything larger than a 5. And the fact that Apple makes cases for them, and not the 5 size or smaller speaks for itself.
You can blame it on the size or how slippery they are. But the larger phones need a case.
I used a red silicone case on my iPhone 6S Plus, until it fell apart, and then I used a leather case until the phone died.
And I ordered a new silicone case a few days after I got my new phone. I didn’t really consider anything but a Apple case, because they are the best.
I get some StackOverflow thread named “How to do”Insert what I Googled for here” syncronous” every single time I google anything generic about Node. And while I do understand the question, I think they are asking the wrong question.
The reason you want this is that you don’t want your web server to be unresponsive while you are executing a huge database query, or your web app to be unresponsive while you are doing a very heavy filter.
I always think “has Facebook a new authentication system?” when I see FaceID
One of the big issues with using either callbacks or Promises is that the code becomes much more complex that it would, if you were using a synchronous programming language. This is where async and await comes in. The keywords are borrowed from C# and .NET and is without doubt one of my favourite features of using C#. You need to prefix your function with the “async” keyword before you can use the await keyword. And every async method will return a promise. This means that you could make a promise by making a async method and use return and throw instead of a regular promise with resolve and reject. So, you’re inside a async method and want to fetch some data from a method that returns a promise; either a promise or another async method. You could either use .then() like before or you could just do something like this: let data = await method() Look at the full example below:
I think that async / await in general makes code less complex, because you can hide most of the callback / promise stuff behind the await keyword, and treat it more like a regular program in for example Python or Ruby. But remember that every method that uses await, need to be async; this means that you need to do this "hack": <code>await Promise.all(data.map(async d => d*2))</code> hack if you need to do await inside a map. Because the map code will return a array of promises. Like I said, all async methods returns a promise. Then, you can resolve them using promise all, and if you prefix it with await, it will give you the result of all of them in an array as result.<br /> Again, Promises and Async methods are two sides of the same coin. I personally look at Promises as the technology behind it all, and mostly use async await to make and deal with them. </div>
Another week another American massacre