Introduction to MobX with React

MobX has slowly built itself up as Redux’s main competition for state management real-estate. Which is definitely not a coincidence. Because, not only is MobX incredibly easy to use; it’s also very powerful. And, believe me when I say this: I’ve never seen React perform any better than when I mix the two of them. But, instead of me telling you, why don’t I show you instead?

A little bit of History: I’ve been working with Redux since version 1.0.0 came out. I was one of the early adopters at my previous company, gave courses on it, and tried to evangelize everyone to my cause. Pretty standard stuff.

Which means that, by the time I found out about MobX, I was already pretty familiar with the competition. Making me change sides was going to be no easy task.

And that’s when I ran into this video by Matt Ruby:

But, since it’s 42 minutes long, I’ll summarize it for you: Mixing MobX and React is like giving your car a consistent Nitro Boost while also reducing its fuel consumption by 90%.

What do I mean by this? The combination literally reduces the number of updates and (by extension) rendering to the bare minimum. Which brings your application to the peak of its performance.

If that doesn’t convince you to give this combo meal a try, nothing will. But, if being super fast is something that interests you, then boy do I have a treat for you next.

Continue Reading "Introduction to Mobx with React"

A lot of talk has been given around React Fiber since it was first announced last year. And even five months later, there are still a lot of questions about it. This article seeks to answer one of them: What question does Fiber answer when it comes to rendering in ReactOr, in other words, what problem does React Fiber solve?

Author’s note: Unlike most of my other articles, this one benefits from some understanding of Javascript, as well as familiarity with ReactJS.  Stephen Grider‘s Modern React with Redux is my personal favorite course for learning this topic, and the one I recommend to most people. I should also mention that, while this article will focus on the web version of the framework, the core concepts can be applied to React Native as well.

React Fiber is an ongoing reimplementation of React’s core algorithm. It is the culmination of over two years of research by the React team.

This is a quote from Geoffrey DhuyvettersWhat is React Fiber and How can I try it out today? Which offers some pretty good guidance towards mastering this new technology, and is definitely worth a read.

But more importantly, this definition tells us two things:

  1. Fiber has been in development for half of React’s open source lifetime.
  2. Fiber is going to change React’s core algorithm.

What is it actually changing though? In very simple terms: Fiber seeks to change the way in which React renders our applications. But, before we can tackle how it will be doing that, we need to understand some core concepts that it aims to improve upon:

Continue Reading "What problem does React Fiber solve?"