A 2-post collection

Do you Promise?

Are you still writing your async JavaScript code using callbacks or async library? It's the time to start to Promises! What is a Promise? As the word says, Promise is something that can be available now, or in future, or never. When someone promises you something, that can be fulfilled of rejected. In JavaScript, Promise represents the eventual result of an asynchronous function. It has 3 different states: pending - The initial state of a promise. fulfilled - Operation is successful. rejected - Operation failed. Why

Read more

Working with HTTP streams with Cycle.js

Hi! These days everyone is talking about functional programming in JS, reactive programming, and streams. Some awesome libraries came out to help us to work with streams and my favorite is Cycle.js. It's created by André Staltz. I've recently started to use Cycle.js framework for reactive programming. This framework gives you the ability to think about what should your app do when some data comes in the stream (Sources) and what it should do when you send some response back (Sinks). It creates an

Read more