JS

Watch User Created Playlist (4)

This playlist is user created.

pro-course-rss-logo

PRO RSS Feed

You've been using Functors

Refactor Business Logic to Composable Functions with Lodash

P

Write an Asynchronous Function with async/await

P

You've been using Monads

javascript tutorial about You've been using Functors

You've been using Functors

3:19 javascript

We learn the formal definition of a functor and look at the laws they obey.

lodash tutorial about Refactor Business Logic to Composable Functions with Lodash

Refactor Business Logic to Composable Functions with Lodash

4:45 lodash PRO

Imagine if looking at your business logic read as simple as a story from a children's book. That's exactly what we'll cover by learning how to compose small pieces of business logic and also set them up for further composition in the future.

We're showing a list of fictional tweets in a trivial React component created with create-react-app, however the example is not React specific and can be applied to any framework/environment.

Our example will refactor out business logic from a non-composable function to small composable pieces. To accomplish this we'll be using flow, filter and map from lodash/fp, which is included in the regular lodash npm package.

This approach works well in any environment where you're not relying on object references to your original data, as our functional approach creates new collection objects instead of mutating them.

Guide to lodash/fp: https://github.com/lodash/lodash/wiki/FP-Guide

javascript tutorial about Write an Asynchronous Function with async/await

Write an Asynchronous Function with async/await

2:01 javascript PRO

This lesson introduces the ES2017 async and await keywords. It shows how to write a short asynchronous function that makes an HTTP request and parses the response.

javascript tutorial about You've been using Monads

You've been using Monads

5:43 javascript

We discover, we've been using monads! We look a little further into the chain method and see laws that ensure the monadic structure works correctly.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?