Introducing React ReExt – Sencha Ext JS Components in React! LEARN MORE

Ext JS & ECMAScript 2015

October 18, 2016 133 Views
Show

Are you ready for SenchaCon 2016? Las Vegas is the place to be for every JavaScript developer! We’ll have great announcements and showcases about the next version of Ext JS. I’ll be doing a session about ECMAScript 2015.

ECMAScript 2015

At SenchaCon 2016, you’ll learn how you can use ES2015 to take advantage of cleaner JavaScript code in your own Ext JS classes and controllers.

Join me for my session: Learn the Top 10 ECMAScript 2015 Features. I’ll cover the top 10 new features of ECMAScript 2015 and teach you how to use them by showing code examples:

Block Code Constructs, Arrow functions, Default Parameters, Promises (see my earlier post on Asynchronous JavaScript: Promises), Classes, Modules, and more.

There are many more cool features, but I can’t fit every cool ECMAScript 2015 feature in my 45-minute presentation, so I’m going to share ECMAScript 2015 Generators with you today.

Generators

Generators are simply subtypes of Iterators. They are a special kind of function that can be suspended and resumed, which is different than iterators.

Generators use function* and yield operators:

Note the yield statements. They return a generator instance and move to the next yield when next() is called.

The snippet for the Dice Generator has a while loop that won’t end. It can roll numbers between 1 and 6.

Generators are supported in most of the modern desktop browsers. See the ECMAScript Compatibility Table.

If you want to use it in production, you’ll need to use a transpiler like Babel, which provides a polyfill.

The new ECMAScript standard will help you write better code, and make it easier. For Sencha developers, we benefit by writing clean code in Sencha classes, controllers, models, etc. I hope you’re as excited about this preview as I am. To learn more about ECMAScript 2015, join me at SenchaCon. Register today.

You’ll have a chance to meet the Sencha product managers and engineers, and you can ask them everything you want to know. Join us in the Sencha Zone, located in the Community Pavilion.

ECMAScript Evolution