Using React and Redux (and Webpack) in the frontend and Meteor (only) in the backend


I have been working on a new Meteor project for a while, using React as the view-layer. Except for the usage of Mantra it is a pretty standard setup.
But since I was so annoyed about the slow reloading times, I added the webpack package to enable HMR.
However, this came with a different set of problems:

  • Webpack with HMR was great, but it slowed down the rebuild and the meteor test mode would not work.
  • I had some performance issues with Tracker. I found ways to resolve those, but it always involved digging and debugging.
  • Also, I wasn’t really happy with Mantra. It borrowed a lot of ideas from Redux, but it just isn’t the same, and I have the feeling that there is no real community evolving around it.

I had the feeling that I could get rid of these problems completely, by remove Meteor from the client. I read @juliancwirko’s article about using Meteor only in the backend, which was exactly what I wanted. I took some code from Dan Abramov’s Redux tutorials on (which are awesome btw) and extended it to be real-time by using a Meteor backend. I also added support for optimistic UI (which at the moment is a bit naive still).

I think this is a pretty powerful setup, that lets me use all the good things in the React ecosystem, while still keeping my app real-time.
(If Apollo supported real-time already, I definitely would have tried that instead!)

Here is the article :tada:
And here the code

I would appreciate any feedback you guys have on this way of combining React, Redux and Meteor.


I like it.

I would vote for taking current Meteor implementation of Optimistic UI and extracting it to npm package to wire it with for example Asteroid. Something easy to use and reusable.

1 Like

What about SSR (Server Side Rendering)?