From Blaze to React 01: Introduction
As you may know, there’s a big shift going on in the Meteor world right now, from Meteor’s “traditional” stack to a more modern, more open ecosystem.
If you’re starting a new project, I believe it just makes sense to pick the React start from the start (assuming you’re familiar with it).
But a lot of us have legacy apps that are still built on top of Blaze and Iron Router, and we can’t just abandon existing projects and customers.
I’m in this situation myself, and I’ve decided to go ahead and take the plunge. I’ll port one of my apps from Iron Router/Blaze app to FlowRouter/React, and what’s more I’ll document the whole process through a series of screencasts.
In case you’re wondering, the app is our very own Discover Meteor app, used to host the book and give customers access to the member’s area. It’s a fairly simple app, but it still features enough challenges to be a good case study.
Throughout this series, I’ll make frequent references to the awesome Meteor Guide to check up on best practices and guidelines.
Let’s Get Started
Here’s the first video, where I outline a general migration plan:
The idea is to avoid a single long, arduous rewrite by instead switching out one “brick” of the app at a time. Each video will focus on one such brick, and hopefully leave the app fully functional at the end of each step.
Broadly speaking, the whole process will be divided in three phases.
- First, bringing the codebase up to date with general Meteor best practices such as template-level subscriptions and using FlowRouter.
- Second, implementing React and phasing out Blaze.
- Third, if needed – and if we have time – looking at using the upcoming Meteor modules (or even Webpack) to better organize our codebase.
So let’s get started, and bring our old apps into the modern world kicking and screaming!