Skip to Content
React: Building Modern Web Applications
book

React: Building Modern Web Applications

by Jonathan Hayward, Artemij Fedosejev, Narayan Prusty, Adam Horton, Ryan Vice, Ethan Holmes, Tom Bray
June 2016
Intermediate to advanced content levelIntermediate to advanced
910 pages
18h 59m
English
Packt Publishing
Content preview from React: Building Modern Web Applications

Implementing modules – the old way

Before ES6, JavaScript had never supported modules natively. Developers used other techniques and third-party libraries to implement modules in JavaScript.

Using Immediately-invoked function expression (IIFE), Asynchronous Module Definition (AMD), CommonJS, and Universal Module Definition (UMD) are various popular ways of implementing modules in ES5. As these ways were not native to JavaScript, they had several problems. Let's see an overview of each of these old ways of implementing modules.

The Immediately-Invoked Function Expression

The IIFE is used to create an anonymous function that invokes itself. Creating modules using IIFE is the most popular way of creating modules.

Let's see an example of how to create ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ReactJS by Example - Building Modern Web Applications with React

ReactJS by Example - Building Modern Web Applications with React

Vipul A M, Prathamesh Sonpatki

Publisher Resources

ISBN: 9781786462268Supplemental Content