I’ve been working with React and Flux for a while now and I really like how Flux handles data flow. Recently I came across Meteor and I’m impressed by its publish-subscribe model and DDP protocol.
I’m in the middle of a project where I’ve already built some React components and set up the app logic using Flux (specifically alt.js). Now I’m thinking about using Meteor for the backend while keeping my React frontend.
My main concerns are:
- Can I use npm packages with Meteor?
- Is ES6 supported in Meteor?
- How does the Meteor React package compare to the official Facebook version?
I’m using webpack for module bundling, if that matters. Any advice on how to make this work smoothly would be great. Has anyone tried a similar setup before?
hey there! i’m super curious about your project. have you thought about using graphql with meteor and react? it could be a neat way to handle data flow. what’s your main reason for wanting to integrate meteor? i’d love to hear more about your app’s features and what you’re hoping to achieve!
I’ve actually experimented with integrating React and Flux with Meteor, and it’s definitely possible. To address your concerns:
-
Yes, you can use npm packages with Meteor, as its npm integration has improved significantly.
-
Meteor fully supports ES6, meaning you can confidently use modern JavaScript syntax.
-
The Meteor React package essentially acts as a wrapper around the official React library, providing Meteor-specific optimizations. You can still use the official version if that better suits your needs.
One challenge to note is reconciling Flux’s unidirectional data flow with Meteor’s reactive data model. Using Meteor as a data source for Flux actions can help maintain a clear separation of concerns while leveraging Meteor’s real-time capabilities. Additionally, although you can configure webpack with Meteor, the built-in Meteor build system is highly capable and might suffice for your requirements.