Reactgo: "Remove" unneeded code for stateless boilerplate

Created on 25 Jul 2016  路  23Comments  路  Source: reactGo/reactGo

Description

  • Type: Enhancement
  • Related Issue: #137 #156

    Enhancement

Was looking an create-react-app and was inspired by the _No Lock-In_ idea.

Problem
There is still a lot to strip out when cloning this boilerplate.

The code that sits in this repository are _useful_ examples of how one would implement certain features with the best practices - we strive for that.

However, I still find myself stripping out a lot of code I don't need.

We've already done a decent job with abstracting out the DB connection in https://github.com/choonkending/react-webpack-node/pull/176 and https://github.com/choonkending/react-webpack-node/pull/190

Suggested enhancement
Have an npm run stateless that:

  • Runsrimraf to remove all the unneeded:

    • DB related and controller files - leaving only the server-rendering bit left

    • Front end code that gets in the way of development (this will involve refactoring a bit of our component code perhaps)

If this gets shipped, and it works swimmingly well, I reckon we can bump our version to 2.0! Yay!

Pros

  • Easy to start work immmeeeeddiatellyyy
  • Feel like a thug

Including
@caranicas @psimyn @jrodl3r @dzotokan and whoever has thoughts!

Discussion enhancement

Most helpful comment

It's done! I've moved it 馃槀 馃槩 We're now reactGo! Yay!

All 23 comments

alternative is to strip it down to be stateless, then move example stuff to a separate repo or a branch

"The simplicity is the ultimate sophistication."

simplify _master_, setup feature branches for add-ons (Mongo, Vote-App, Todo-App, etc.)

personally, the first thing I did was flatten /db and remove all non-Mongo stuff... :neckbeard:

Or... Setup an ORG and do repo's instead of branches 馃憤

Ok, apparently I closed my window before hitting the comment button earlier. :expressionless:

So enjoy my now less thoughtful comments.

I am embarrassed to admit how long I had the todo code sitting inside my app for reference, so I think it is indispensable resource. There are myriad boilerplates out there that focus on getting you up and running, but most of them are blog fodder. They don't focus on best practices, helping you understand how or you should be coding, and the certainly aren't getting better. I evaluated quite a few before I settled on this on this one.

So I totally agree with @jrodl3r and @psimyn. I would going to suggest the multiple repos, and allowing the stateless version to live upstream of the more tutorial oriented version. I hadn't considered the idea of an ORG, but I think that is actually a really good idea, if we are splitting this in to multiple repositories then that is essentially what we are doing anyway. It would allow us the freedom to structure things properly.

Also I know there is the Yeoman Generator created by @iiegor. I don't know how up to date it is/ if it stays up to date as this repo gets updated. One option would be to use that (or some version of it) or even better, our own command line tool (never built one, sounds like a neat idea, and if we are going to be an org, then a command line tool and mascot are basically mandatory) that would allow people to pick and choose which features they might want included.

Everyone ready for an adventure?

Thanks for the suggestions guys!

Setup an ORG and do repo's instead of branches

Agreed

command line tool (never built one, sounds like a neat idea, and if we are going to be an org, then a command line tool and mascot are basically mandatory) that would allow people to pick and choose which features they might want included.

Hahaha this should be the next thing after we port our repos over!

Important question

What should the organisation name be?

  • rwn already taken
  • [ ] react-fullstack-boilerplates
  • [ ] ninjaocean
  • [ ] ijustwannakode

This thread might get long lol based on the suggestions. I will create an org as soon as we agree on one. In the meantime, will start a branch with 2.0 clean branch :)

reactis
react跇s
rectjs
:hamster:

Couldnt' resist.

Here's what the new version would look like without db config or passport.

Still going to clean up the client side to just have react-router but no routes or functionality.

Once we reduce to the final features we can evaluate to see that's what we want.

馃殼 NinjaShip
ReactUP
ReactGO

something small, easy to type...

I will now come up with several terrible names

  • Restax
  • RNEW - react, node, express, webpack (pronounced renew)
  • UniReact
  • Practical React
  • Best REprACTices
  • Best React Boilerplate, #VeryGood.
  • 4 guys 1 boilerplate

I think Practical React might not be terrible, but I will try to come up with better ones later.

edit: I was hesitant to add express a part of the naming because I thought that would limit us from eventually moving over to Koa if we felt like that was a good idea. And similarly I left out redux, because while it is super awesome, it wasn't the first flux implementation this boilerplate used, and I don't think it will be the last.

@caranicas I might have been a little aggressive with my example branch/repo-names 馃槈 The core-logic and working demo is obviously a key piece to getting people up and running quickly. That should have read: _(Mongo, Postgres, Stripped/Barebones, etc)_

Down the road we can easily add repo's that swap-out core-logic (ex: "HNews-App" or "Todo-App")

I like that RNEW!

  • Node-Express-Webpack-Enzyme-React (NEWER-Stack)
  • React-Express-Node-Enzyme-Webpack (RENEW-Stack)

I'm so cheating w/ Enzyme... heh

my list of more esoteric names focused on theme of modular, easy to read and well intentioned code.

  • slice
  • island / archpelego
  • harvest
  • runway
  • council
  • breeze
  • pomegranate (pom)

I'll keep thinking....

LOL guys, loving the creativity!

I really like ReactUp and ReactGo, cause it's simple and concise! (And on an unrelated note, I kinda am addicted to Pokemon Go). What do you guys think?

Vote for

ReactGO

Vote for
ReactUp

Suggested Support And repository Names

ReactGo - minimal
_Goal : Minimum support for this app to be useful for production_. This will be the main repository for us to work on.

  • [ ] universal Rendering
  • [ ] Redux
  • [ ] React-router + react-router-redux
  • [ ] Asynchronous Data Fetching on server-side rendering? Maybe a fake end point? Maybe unneeded for the minimal boilerplate
  • [ ] CSS modules + Css next
  • [ ] Enzyme test
  • [ ] Deployment files

Separate repositories

Mongo

  • Todo Example
  • React-router server side authentication
  • Asynchronous Data fetching

Postgres

  • Todo Example
  • React-router server side authentication
  • Asynchronous Data fetching

Socket IO

just me, but I'd startup the org first, then start 2.0 issues, etc over there...

@jrodl3r Good point. I was kind of spec-ing out what to separate first though. Agree that it will make more sense to create the issues there.

I've created the org reactGo on the train this morning.

Should it be called

  • [ ] Stateless
  • [ ] Minimal
  • [ ] react-webpack-node

etc. Suggestions for that haha.

I'd like to transfer that repository or point to the repository from here once it's done.

the best band's first album is always self-titled ; )

"reactGo"

Created https://github.com/reactGo/reactGo, but I am thinking of transferring this repository to that once we have a minimal boilerplate out (so there will be redirects) when people come to this repository. (Not sure whether this is the correct approach, but that's how redux-simple-router was renamed and moved to reactjs)

Hey guys, just created a doc to have a bit more visibility on what I have in mind for reactGo.

https://github.com/choonkending/react-webpack-node/blob/master/Roadmap.md

Please review.

I'm going to transfer the repository to reactGo, and we will work on release 2.0 over there? (As @jrodl3r suggested).

What do you peeps think? (Meanwhile I'm going to try to solve other issues raised here).

Looks good, vision sounds great... I'll volunteer a nice responsive/flat-UI for the App-Example 馃嵒

It's done! I've moved it 馃槀 馃槩 We're now reactGo! Yay!

Closing in favour of https://github.com/reactGo/reactGo/projects/1 and the cards on that wall!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jrodl3r picture jrodl3r  路  7Comments

gsccheng picture gsccheng  路  6Comments

kenjim83 picture kenjim83  路  8Comments

davidychow87 picture davidychow87  路  4Comments

evansteelepdx picture evansteelepdx  路  3Comments