Meteor 1.3 + React Boilerplate

I’m having a hard time seeing where Home.jsx is loaded from. I see that it’s used in routes.jsx but it doesn’t seem to be explicitly imported. Isn’t it how it’s supposed to be done with the import introduced in Meteor 1.3?
Also is routes.jsx automatically loaded by Meteor ?

Great repo by the way, and very cool to be able to work with a more basic version before going into Redux thanks to git.

Am I the only one who thinks this is overcomplicated to just do the basics?
While I am trying very much to ‘like’ React and its ecosystem … I am starting to give up :slightly_smiling:

Also, how will this help more people come to Meteor?

Finally, the roadmap of Meteor for next year seems to have a large focus on GraphQL / DB and little on view layer (except maybe one). So it seems left to the community (PS: I do agree this is needed for Meteor to be used in many commercial environments).

Look forward to Web Components to get us out of this mess :smile: !

1 Like

Good catch! Will fix that.

This boilerplate is not meant for “the basics” though. It’s meant to be used as a boilerplate for fairly complex apps.

IMO there’s not much to be concerned about with regards to the view layer. Everything is pretty much covered by now, your options being Blaze, React, or Angular.

Boilerplate updated to include an .eslintrc file. As someone who’s extremely picky about code legibility, it’s probably fairly strict. :slight_smile: Though after refining and rethinking my own code style for years, I think is a good set of rules to follow!

Be sure you have eslint installed:

$ npm install -g eslint
$ npm install -g babel-eslint

More updates to the boilerplate:

  • Optimizations in the scaffolding process
  • A couple bug fixes
  • Syntax updates to comply with the .eslintrc
  • Updated to Meteor 1.3
  • Added Enzyme for testing React components
  • Added react-autobind to deal with auto-binding methods in React classes
  • Removed react-mixin, in favor of using new Meteor createContainer higher order function to bind reactive data sources

The example app will be updated soon in light of these changes.

1 Like

Hey all - I’d advise not using this boilerplate for now. I realized I’d been wrong all this time, and that the imports folder is actually crucial. I thought I could get away with not using it, simply because everything I’ve done up till the past week was totally working great. Then I stumbled into a case where an imported React component came up as undefined.

So, I’ll be restructuring the boilerplate accordingly, and will post here when it’s ready to go again.

2 Likes

Thank you for this. Just what I needed.

Hey all,

I just corrected some mistakes in my boilerplate, specifically with the folder/file structure. I initially didn’t like the idea of having to use the imports folder because I generally prefer to not add more levels of depth to my projects. For a very long time, forgoing this structure and just using import worked fine, until one day it didn’t. :wink: Live and learn!

So this is now fixed/restructured, and I added the amazing React Storybook by @arunoda & team.

As I’ve mentioned before, this is by no means a “boilerplate for all”—it’s very specific to how I like to work, so it may or may not be up your alley. But if you find it useful, then great!

Still to do: update the very stale example branch. Will post again when that’s done.

2 Likes

Just published v2.1.0 of the boilerplate!

React Storybook was taken out, but then put back in. :slight_smile: Meteor testing works now, with Enzyme too! (npm run test-watch). I also added support for Flow.

1 Like

any plans to move away from mixins to something like react komposer?

The boilerplate already has. The example app, I just haven’t had time to update it.