Establish Callback and Closure patterns Around Async Browser Behaviors
Offered By: egghead.io
Course Description
Overview
JavaScript is full of inconsistent APIs. Wrapping those APIs in functions allows you to have full control over how to configure them and make them more reusable.
This becomes even more beneficial when dealing with the async nature of JavaScript. You'll learn how a broadcaster is a function that wraps another function (which we call listeners) and modifies the behavior. We will build up this pattern in a way that allows you to compose broadcasters together making your code more reusable.
You're in Section 02 of Composing Closures and Callbacks in JavaScript
This becomes even more beneficial when dealing with the async nature of JavaScript. You'll learn how a broadcaster is a function that wraps another function (which we call listeners) and modifies the behavior. We will build up this pattern in a way that allows you to compose broadcasters together making your code more reusable.
You're in Section 02 of Composing Closures and Callbacks in JavaScript
Syllabus
- Create a Function to Configure setTimeout
- Return a Function to Cancel an Async Behavior
- Wrap addEventListener in a Function for More Control
- Create a Utility Function to Control setInterval
- Combine Multiple Async Behaviors with a Merge Function
- Use Lodash Curry When Functions Return Functions
- Match Function Requirements with Lodash Partial and Flip
- Create a Buffer to Pair Values Together with Zip
- Pass an Array to a Callback with a forOf Function
- Pass a Done Symbol when an Async Function is Done
Taught by
John Lindquist
Related Courses
Introducción a la programación en Java: escribiendo buen códigoUniversidad Carlos iii de Madrid via edX Java Inheritance, Composition and Aggregation
Coursera Project Network via Coursera Learn Angular 2 from Beginner to Advanced
Udemy Software Engineering Principles in Python
DataCamp Fundamentos de C# para Principiantes
Udemy