Still Paying Per Course? Get Every Coursera Certificate for ₹7,999
Finance Certifications Goldman Sachs & Amazon Teams Trust
Overview
Google, IBM & Meta Certificates — All 10,000+ Courses at 40% Off
One annual plan covers every course and certificate on Coursera. 40% off for a limited time.
Get Full Access
Explore the controversial topic of JavaScript classes in this 47-minute Devoxx conference talk. Delve into potential issues and pitfalls of using classes, including the need for context binding of methods. Discover alternative patterns that are conceptually simpler, easier to work with, safer to use, more idiomatic, and require less code. Learn about factory functions, object composition, function decorators, modules, singletons, and React Hooks as powerful alternatives to class-based components. Gain insights on adjusting expectations and leveraging functions as the core building blocks in JavaScript development.
Syllabus
Introduction
Who am I
Agenda
Why classes
Example
Classes in JavaScript
The problem with classes
False expectations
Lack of features
Context binding
Constructor binding
increment method
tools classes
avoid classes
whats left
factory function
API class
Object composition
Create base counter
Create step counter
Functions toolbox
Function decorator
Module
Singleton
React Hooks
Examples
HBU
Classbased components
Complicated patterns
Recap
Adjust your expectations
Questions
Taught by
Devoxx