New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MERN V2 #146

Closed
somus opened this Issue May 25, 2016 · 29 comments

Comments

Projects
None yet
@somus
Copy link
Contributor

somus commented May 25, 2016

For the past few weeks, we were busy with the development of Hashnode. That's why couldn't give more time to MERN. We are sorry for those pending issues and pull requests. We will close those issues ASAP.

In upcoming weeks, we are planning to release the next version of MERN. This is a discussion thread for what should go in MERN v2. I'm adding a rough list of things what we think would be a great addition to MERN. If you think something should not be there or something else should be there, feel free to comment.

  • Improve file structure (#90)
  • Add PostCSS with CSS Modules (#89)
  • Update deps
  • Upgrade to webpack 2 and implement tree shaking
  • Code splitting with react-router
  • Add react-hot-loader 3
  • Add ava and enzyme for testing with code coverage (#143)
  • Create server bundle for production (#48)
  • Commenting code (#39)
  • Add docker
  • Add react-intl (#54)
  • Update documentation

Note: I'll be creating a v2 branch, please make all future PRs against that branch.

@carloscuatin

This comment has been minimized.

Copy link
Contributor

carloscuatin commented May 25, 2016

great was waiting for this to start contributing to this great project 👍

@somus somus referenced this issue May 25, 2016

Merged

React Helmet #44

@carloscuatin

This comment has been minimized.

Copy link
Contributor

carloscuatin commented May 25, 2016

@somus create branch ? v2.0.0 ?

@joernroeder

This comment has been minimized.

Copy link
Contributor

joernroeder commented May 25, 2016

One thing I'm currently missing are server-to-server api calls with credentials (cookies) set. I was working on a form with presaved state which wasn't possible on the server and I ended up using an additional request on the client only.

@somus

This comment has been minimized.

Copy link
Contributor Author

somus commented May 25, 2016

@carloscuatin Created.

@SOSANA

This comment has been minimized.

Copy link
Contributor

SOSANA commented May 25, 2016

@somus can we assign @weslleyaraujo for implementation of postCSS? as mentioned in #89

@SOSANA

This comment has been minimized.

Copy link
Contributor

SOSANA commented May 25, 2016

@carloscuatin you been assigned anything yet?

@carloscuatin

This comment has been minimized.

Copy link
Contributor

carloscuatin commented May 25, 2016

@SOSANA I'm working on changing the test runner and possibly add react-intl

@carloscuatin

This comment has been minimized.

Copy link
Contributor

carloscuatin commented May 25, 2016

although I think the first thing that will work is the file structure so that is not so difficult to add new updates, we agree that the final structure is proposed by @somus in #90 ?

@somus

This comment has been minimized.

Copy link
Contributor Author

somus commented May 26, 2016

@SOSANA Definitely. I'm not sure whether to have SASS only or PostCSS only or both with CSS Modules. PostCSS looks like a good option. I'm leaning towards pre-processing with SASS and post-processing with PostCSS. @SOSANA @carloscuatin @weslleyaraujo @Ajar-Ajar @evansendra @raksonibs what do you think?

@evansendra and @raksonibs have done a great job in implementing scss in #50 and #81. But, I think we should import and process scss using webpack. For isomorphic support, as I mentioned above webpack isomorphic tools looks like a good option.

@carloscuatin You are right. We should first implement the file structure changes. If the option which I proposed in #90 looks good, I'll get on with implementing it. After that, we can target rest of the features in the list.

@somus

This comment has been minimized.

Copy link
Contributor Author

somus commented May 26, 2016

@joernroeder You can use something like express session middleware to preserve data on the server side. would this solve your problem?

@carloscuatin

This comment has been minimized.

Copy link
Contributor

carloscuatin commented May 26, 2016

@somus I'm moving in the file structure

@carloscuatin

This comment has been minimized.

Copy link
Contributor

carloscuatin commented May 26, 2016

add react-hot-loader version 3 ?

This was referenced May 26, 2016

@carloscuatin

This comment has been minimized.

Copy link
Contributor

carloscuatin commented May 26, 2016

merged in branch v2.0.0 no ?

@joernroeder

This comment has been minimized.

Copy link
Contributor

joernroeder commented May 26, 2016

@somus yes, i'm using the session middleware right now, the main problem was forwarding the requests from the client to the api route during server-side rendering.
Imagine the following example: A client with an active session (logged in) requests an api endpoint directly, sends it's stored session via fetch with cookies enabled, the middleware on the server connects the request to the session and responds accordingly.
In contrast to the direct client side request is the server the initiator of the fetch request during ss-rendering and the cookie value needs to be forwarded from the client-->server to the server-->server request.

The https://github.com/erikras/react-redux-universal-hot-example claims that:

Both client and server make calls to load data from separate API server

but i had no the time to check it out yet…

@osenvosem

This comment has been minimized.

Copy link

osenvosem commented May 26, 2016

Change state management library from Redux to MobX which is much simpler, intuitive and faster. Demands less boilerplate and code.
cfhtqs-wwaazkkw

@somus

This comment has been minimized.

Copy link
Contributor Author

somus commented May 27, 2016

@osenvosem Thanks for the suggestion. :) I've been hearing good things about MobX. We even had an AMA with MobX creator at Hashnode. But, it introduces a couple of new concepts and I'm not sure whether it will be beginner friendly. But, we are planning to make mern-cli clone different versions of mern-starter (more details at Hashnode/mern-cli#10). In future, we can fit in a version with MobX there.

@osenvosem

This comment has been minimized.

Copy link

osenvosem commented May 27, 2016

@somus actually MobX is more beginner friendly than Redux (which is more complicated). You mark your state as @observable, you mark react component as @observer and that's it. With Redux (and several mandatory libs with it) beginners must learn and write much more.

@weslleyaraujo

This comment has been minimized.

Copy link

weslleyaraujo commented May 27, 2016

@osenvosem I am quite new to MobX, would it play nice with server side render as well?

good suggestion 💪

@osenvosem

This comment has been minimized.

Copy link

osenvosem commented May 27, 2016

@weslleyaraujo I haven't had a need in that yet, but I saw a couple examples of SSR here on github. For example

@ischyrus

This comment has been minimized.

Copy link

ischyrus commented May 27, 2016

Getting code coverage configured and installed as part of the package.

@SOSANA

This comment has been minimized.

Copy link
Contributor

SOSANA commented May 27, 2016

@osenvosem, open an issue to discuss Mobx so we can keep the discussion and topics related to mern v2

@hounded

This comment has been minimized.

Copy link

hounded commented May 29, 2016

could it be possible to adapt the Ducks methodolgy so that way we can bundle up the functionality we are creating therefore having some kind of module system that would allow the community to develop modules for the mern stack?

@Ajar-Ajar

This comment has been minimized.

Copy link

Ajar-Ajar commented Jun 1, 2016

Any plans to add authentication?
passport, tokens, social OAuth, the real thing...
I think it's pretty basic... every application needs one,
and it's not trivial how to set it up in Mern...

@somus

This comment has been minimized.

Copy link
Contributor Author

somus commented Jun 1, 2016

@Ajar-Ajar There are a lot of ways to include auth. There is no single universal way to do it. We don't want to add one single method in mern-starter. That's why we are going to make mern-cli clone variants of mern. One of the variants can have social auth, and other can have jwt auth. Through this way, the possibilities are infinite. We are looking to modify mern-cli with this week to make it possible.

@Ajar-Ajar

This comment has been minimized.

Copy link

Ajar-Ajar commented Jun 1, 2016

Sounds exciting!!!
looking forward to see it in action :)

@mayankchd

This comment has been minimized.

Copy link
Contributor

mayankchd commented Jun 2, 2016

Tree shaking and code splitting with react-router is super super cool!

@koshuang

This comment has been minimized.

Copy link

koshuang commented Jun 20, 2016

Good job for you guys. Just wondering if you have any plans about using redux-saga?
Thanks!

@somus

This comment has been minimized.

Copy link
Contributor Author

somus commented Jun 21, 2016

V2 is released. 🎆 📢 🍻 😸
We have also updated mern.io. Check it out.

@somus somus closed this Jun 21, 2016

@brandonburkett

This comment has been minimized.

Copy link

brandonburkett commented Jul 27, 2016

I know this is closed, but just curious if anyone made or is making a mobx version. I did a mern-cli list but it didn't look like anyone published a variant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment