Tag: React

  • Callback refs as componentDidMount in stateless functions in React

    You might think that when developing user interfaces with React and if you want to e.g. apply jQuery method to an element, you must abandon your beloved stateless function in favor of class-based component, directly or indirectly via higher-order components, because stateless function doesn’t have componentDidMount life-cycle hook. You are wrong, you can use callback…

  • Functional programming

    2016 was the year my understanding and appreciation for functional programming grew big time. Functional programming (FP for short) is a programming model old as programming but its popularity gained traction only a couple of years ago. According to Wikipedia, it’s “a style of building the structure and elements of computer programs—that treats computation as…

  • Reactive React component using MobX (counter example)

    In the following (muted) video for beginners I show how simple it is to make a React component reactive using MobX. Component displays counter’s value and buttons for incrementing and decrementing it and when user clicks the buttons, value is updated on screen accordingly. The main takeaway from this example is this: when observable variables…

  • Developing web applications with React and its ecosystem

    React with its component-based approach is fun! But you can find it hard to build web application with it. That’s because React is not a framework. It’s a library which does one part of building web applications, rendering views, and does it well. You need to bring in other libraries (ecosystem) and piece them together…

  • On using Immutable.js

    I’ve been using Immutable.js for quite some time in my non-trivial React/Redux projects and it has been paying off. Beside Redux’s requirement of never mutating its state, the library provides other relevant features that were a deciding factor for me to start using it. This article explains very well, what immutability is, why it is…