I’ve been working with React and Flux for a while now and I really like how the data flows in one direction. It makes things easier to manage.
Recently, I came across Meteor and I’m impressed by its publish-subscribe model and DDP protocol. I’ve already built some React components and set up the app logic using Flux (specifically alt.js) for a project I’m working on.
I’m wondering if it’s possible to use Meteor just for the backend while keeping my existing React frontend. I’m also using some npm packages and webpack for module bundling.
A few questions:
- Can I use npm packages with Meteor?
- Is it possible to write ES6 JavaScript in a Meteor project?
- I noticed there’s a React package for Meteor on Atmosphere, but it’s not the official Facebook version. Will this cause any issues?
Any advice on how to best approach this integration would be really helpful. Thanks!
yo GrowingTree! cool project idea. i’ve done smthing similar. npm works fine w/ meteor, and es6 is supported. the react pkg shouldn’t be an issue if u’re careful. have u checked out apollo? it might be a good fit for ur stack. lmk if u need more info!
hey there! i’m curious about this too. have u considered using meteor’s DDP client libraries to connect ur react app to meteor’s backend? that might be a good way to keep ur existing setup. also, what made u choose meteor for the backend? i’d love to hear more about ur project and what features u’re looking for!
I’ve successfully integrated React and Flux with Meteor in a recent project. To answer your questions:
-
Yes, Meteor supports npm packages. You can use them alongside Atmosphere packages.
-
Meteor fully supports ES6 JavaScript. You can write your code using modern syntax without issues.
-
The React package on Atmosphere shouldn’t cause problems if you’re careful with versioning. However, you might consider using the official React package from npm for better compatibility.
For integration, I’d recommend using Meteor’s DDP client to connect your React frontend to the Meteor backend. This approach allows you to leverage Meteor’s real-time capabilities while maintaining your existing React and Flux architecture.
Consider exploring Apollo for state management as well. It works well with both React and Meteor, potentially simplifying your data flow.