How do you handle necessary side effects like API calls while keeping your core logic pure and testable?
#1about 2 minutes
Core principles of functional programming
Functional programming builds programs using pure functions, immutable values, and higher-order functions to minimize side effects.
#2about 2 minutes
Benefits of adopting a functional paradigm
Writing functional code leads to more readable, testable, and reusable programs while avoiding common issues like `this` context in JavaScript.
#3about 2 minutes
Writing functional JavaScript with React components
Transitioning from class components to functional components with hooks is a practical example of applying functional principles in a JavaScript application.
#4about 3 minutes
Understanding and writing pure functions
A pure function always returns the same output for the same input and avoids dependency on global variables to ensure predictable results.
#5about 2 minutes
Maintaining immutability in JavaScript
Avoid mutating original data structures like arrays by using techniques such as the spread operator to create new instances.
#6about 1 minute
Using higher-order functions for clean code
Higher-order functions like map and reduce process data structures without mutating the original value, leading to safer and more declarative code.
#7about 1 minute
Identifying and minimizing side effects
Side effects are any changes outside a function's return value, such as logging or mutating global variables, which should be minimized.
#8about 2 minutes
Real-world applications of functional programming
Functional principles are applied in modern development through tools like React functional components, Redux reducers, and atomic design systems.
#9about 4 minutes
Managing necessary side effects in applications
Handle unavoidable side effects like API calls, logging, and routing by isolating them using middleware patterns like Redux epics or observables.
#10about 6 minutes
Audience Q&A on functional programming concepts
The speaker answers audience questions about organizing large functional codebases, the cons of FP, using libraries like Immutable.js, and performance implications.
Related jobs
Jobs that call for the skills explored in this talk.
Matching moments
05:00 MIN
Core principles of the functional programming paradigm
Down the Oregon Trail with Functional C#
00:31 MIN
Comparing functional and object-oriented paradigms
Phel, a native Lisp for PHP
02:18 MIN
Shifting from object-oriented to functional programming
F#, path to functional enlightenment
02:36 MIN
Understanding functional programming principles in C++
Functional Programming in C++
04:32 MIN
Introduction to JavaScript design patterns
10 must-know design patterns for JS Devs
02:51 MIN
The core concept of pure functions versus side effects
Java with a Clojure mindset
03:32 MIN
Understanding functions as mathematical concepts
F#, path to functional enlightenment
04:53 MIN
The four pillars of high-performance JavaScript
Things I learned while writing high-performance JavaScript applications
Dev Digest 136 - No JS(on) of mineNews and ArticlesDouglas Crockford is our featured video, so let's talk about evolving JavaScript and all things JSON. Judicious JSON explains all the weird things in it, you can learn why it can be incredibly slow, people wonder what even is a JSON ...
Chris Heilmann
All the videos of Halfstack London 2024!Last month was Halfstack London, a conference about the web, JavaScript and half a dozen other things. We were there to deliver a talk, but also to record all the sessions and we're happy to share them with you. It took a bit as we had to wait for th...
Luis Minvielle
The Best JavaScript Framework to LearnWhen the Greek mastermind Heraclitus, millennia ago, claimed that “the only constant is change,” he certainly pepped up Star Wars creator George Lucas to perpetually re-do shots crucial to the canon storyline or even paved the way for grocery stores ...
From learning to earning
Jobs that call for the skills explored in this talk.