Mindblown: a blog about philosophy.

  • Advanced Immutable.js Recipes: How to use Immutable.js in the real world

    Advanced Immutable.js Recipes: How to use Immutable.js in the real world

    Working with Immutable Maps or Lists is one thing, but how do you work with complex objects, such as deeply nested Maps in a List, or a List in a deeply nested Map? This tutorial shows you how to actually use Immutable in real world situations. Add List items to a List nested deeply within […]

  • Immutable.js: How and when to use Set’s Union, Intersect and Subtract methods

    Immutable.js: How and when to use Set’s Union, Intersect and Subtract methods

    An Immutable Set provides powerful Set operations such as intersect, union and subtract. This tutorial shows you how to use them, and when to use them instead of merging Lists. When to use Sets and the Union, Intersect and Subtract methods The unique property of a Set is that its values are always unique. Immutable’s […]

  • Immutable.js: Creating Sets

    Immutable.js: Creating Sets

    A Set is similar to a List at first glance, but has a number of different properties and functions. In this tutorial, we’ll look at how to create a Set, and why you’d use a Set over a List. Set Although a Set is similar to a List, its differences make it more suitable for […]

  • Immutable.js: 6 Ways to Merge Maps, with full live examples

    Immutable.js: 6 Ways to Merge Maps, with full live examples

    Immutable offers many different ways of merging two or more Maps together. Choosing the right way, though, is confusing, unless you have an awesome guide with copious examples – which, funnily enough, is what this tutorial is. Merging Maps There are six different ways to merge two or more Maps together. Use them as follows: […]

  • Immutable.js: Get, Set, Update and Delete Data from Maps

    Immutable.js: Get, Set, Update and Delete Data from Maps

    Now we know how to create an Immutable Map, we’ll take a look at how we can get data from it, and how to add and delete items from it, all without mutating it. Note that the usual caveat applies: Immutable does not change a Map with any operation, so whenever you see phrases such […]

  • Immutable.js: Every way to create an Immutable Map

    Immutable.js: Every way to create an Immutable Map

    An Immutable Map is similar to a JavaScript object but it can seriously trip you up if you don’t know how it works. This article is the first in a deep dive of Immutable Maps, to show you how to use them the right way. What is an Immutable Map? An Immutable Map is an […]

  • Immutable.js: Merging Lists finally explained

    Immutable.js: Merging Lists finally explained

    In previous posts, we’ve seen how to create a new List, and how to add, insert and delete items. Now it’s time to get a bit more advanced and look at the ways you can merge two or more Lists together. Note: Remember that Immutable does not alter any of the Lists being merged. The […]

  • Immutable.js: All the Examples you’ll ever need to Get, Set and Delete data from Lists

    Immutable.js: All the Examples you’ll ever need to Get, Set and Delete data from Lists

    We’ve seen how to create a new List, but how do you get at its data, or add or delete data from it once it’s been created? It’s not always obvious, so here are all the examples you always wished were in the documentation. Getters Get a value from a List with get() Like Arrays, […]

  • Immutable.js: The Foolproof Guide to Creating Lists

    Immutable.js: The Foolproof Guide to Creating Lists

    An Immutable List is similar to a JavaScript array, but different enough to catch you out if you don’t create a List correctly. Here are all the different ways to create a List, using arrays, objects, and everything else. Create an empty List // Empty List: const list = Immutable.List(); // Output: list; Create a […]

  • Immutable.js: An Introduction with examples written for humans

    Immutable.js: An Introduction with examples written for humans

    Immutable.js is an awesome library for creating Immutable collections of data, hugely popular for React/Redux development, but not blessed with great documentation. Struggle no more, with this first in a series of in-depth tutorials, complete with live coding examples. What is Immutable.js? Immutable.js (or just Immutable from now on) is a library for creating collections […]

Got any book recommendations?