Book Image

Mastering Your Web Application Using Functional Javascript [Video]

By : Michael Rosata
Book Image

Mastering Your Web Application Using Functional Javascript [Video]

By: Michael Rosata

Overview of this book

<p><span id="description" class="sugar_field">In this course, you will be comfortable using functional programming to handle asynchronous code (events and fetching APIs), error handling and writing clean functional code that can handle unknown values without becoming difficult to read.</span></p> <p><span id="description" class="sugar_field">To accomplish this, we’ll learn about building Type-classes, functional types that are used to specifically handle situations like this while keeping code looking familiar (an easy interface), pure and of very DRY.</span></p> <p><span id="description" class="sugar_field">We will build a Functor into a Monad piece by piece and do examples showing how each part is useful and how their simple API can almost magically handle so many difficult concerns without too much code. You’ll learn about Maybe, Either, Future and even Reactive Streams with Observables to write asynchronous code that looks more like synchronous FP. </span></p> <p><span id="description" class="sugar_field">Take this course if you already understand the fundamentals of Functional JavaScript. It is assumed that you know about closures, composition, higher-order functions like map, filter and reduce, currying, and that you are familiar with using basic Promises.</span></p> <h2><span class="sugar_field">Style and Approach</span></h2> <p><span class="sugar_field"><span id="trade_selling_points_c" class="sugar_field">This course moves quickly, touching upon the information you need to understand these advanced techniques without confusing the details. Videos move at a perfect pace from one topic to the next, interlaced with great examples and practical use cases</span></span></p>
Table of Contents (5 chapters)
Chapter 5
Finishing Our Application
Content Locked
Section 1
Add a Stream to Connect Firebase to App Data Store
Connecting to Firebase was simple. Using Firebase to handle data inside our app would require circumventing the action/reducer pattern that our data already moves through. We would lose the deterministic DOM representation and integrity of “Time travel” debugging. Luckily, we can create “middleware” to integrate Firebase into our “redux-ish” store. - Invent custom actions to dispatch when starting/stopping listening to firebase - Write custom middleware to filter these actions when they’re dispatched - Only “normal” actions get passed along to our apps reducer