mantrajs / kickstart-mantrajs-webpack

Kickstart application with Mantrajs and meteor-webpack
45 stars 12 forks source link

Update to Meteor 1.3 / webpack:webpack 1.0.12 #9

Closed eXon closed 8 years ago

eXon commented 8 years ago

Meteor 1.3 is out! I've updated webpack so I wanted to let you know so you can upgrade the packages :)

yogiben commented 8 years ago

It would be great to get a comment from @arunoda whether Mantra is looking to adopt webpack officially or whether it will always be a choice: webpack vs. no-webpack

arunoda commented 8 years ago

@yogiben Mantra is a guideline for app architecture. So we are pretty okay with whether it's webpack or no-webpack. I hope both have pros and cons.

So, it's up to you to decide :)

genyded commented 8 years ago

I know this is a few weeks old, but one thing to consider - and the reason most use webpack with Meteor is for HMR and code splitting. But HMR requires React classes and Mantra leans towards functional components with classes only for container components. While either seems to work OK, to get webpacks HMR, you MUST use React classes even for non-container components. It may be worth pointing this out somewhere.

tomitrescak commented 8 years ago

@genyded it is written in the read me with big phat letters ;)

Mantra prefers to use stateless (bare) react components. These components do not support HMR. If you want to use HRM, you need to use standard React components:

genyded commented 8 years ago

Guess I need to learn how to read ;-)

tomitrescak commented 8 years ago

Nah, happens all the time to me ;) I'll close this as I have also accpeted the PR. Thanks!

yogiben commented 8 years ago

@tomitrescak I had a discussion with my team today about stateless components

Where can I find the arguments for using them?

tomitrescak commented 8 years ago

I would not write it better than this: https://medium.com/@joshblack/stateless-components-in-react-0-14-f9798f8b992d#.6w2i4ah03