There used to be a point where even the basic features of ES6 were rather experimental. … Read article “Differential Serving”
You’ve likely heard about and started using the usual stuff: arrow functions, let and const, rest and spread operators, and so on. One feature, however, that caught my attention is the use of default parameters in functions, which is now an official ES6+ feature. This is … Read article “Using Default Parameters in ES6”
I saw this little web app (live demo) by Das Surma going around the other day. It’s funny, but it’s also a really compelling demo app for a bunch of modern technologies. I’m sure that’s the whole point of it.
- Minimal build process. Just Gulp to use Babel and PostCSS. It’s heavy on ES6+ and CSS custom properties.
- Loads of custom elements, like
<tinderforbananas-item>, with the Polymer polyfill for those.
- Icons are super tiny SVG, they look
The Template Literal, introduced in ES6, is a new way to create a string. With it comes new features that allow us more control over dynamic strings in our programs. Gone will be the days of long string concatenation!
To create a template literal, instead of single quotes (
') or double quotes (
") quotes we use the backtick (
`) character. This will produce a new string, and we can use it in any way … Read article “Template Literals”
While support for ES6 is always increasing, we can’t always assume that users will be using a browser that supports all its features. So, in order to utilize ES6 features now and make sure we won’t run into cross-browser compatibility issues, we need to transpile our code.
Let’s look at two possible ways we can perform the task of transpiling our code. First, we will use npm scripts and Babel. For the second, we will look at using Gulp with … Read article “Transpiling ES6”