Live data from Hacker News

Create React Apps with No Configuration

facebook.github.io

151–160 of 250 posts

Re: Create React Apps with No Configuration

#152
post #57
post #25

> Having just attended EmberCamp a week ago, I was excited about Ember CLI. Ember users have a great “getting started” experience thanks to a curated set of tools united under a single command-line interface. This is one of the best things about Ember. `ember new`, `ember serve`, ember generate component my-component`, `ember build`, `ember deploy`, `ember install`. It's opinionated but it lets you get productive rig…

Kind of interesting to think about the two projects and how they diverge based on the core developers. Ember is made by folks who work on / for small and medium companies[1]. They don't have the build infrastructure Facebook does and are able to create an anointed solution in Ember-CLI because they'll use it daily. React is stuck in a place where the environment it's developed in is unique from what any other user wi…

> There's no official path from view layer -> complete app (no guidance for data flow, how to communicate with the server, server side rendering, routing on the client).

Every time I've decided to take an afternoon to poke at React this is where I've given up. I totally understand the model and appreciate how useful it can be but I've never been clear about how to actually hook it up to a backend that isn't just the generated demo scenario and what the requirements for my backend would be.

Re: Create React Apps with No Configuration

#153
post #148

Having a consistent API with ember-cli will make this more useful. $ react-cli

Only for those used to ember-cli. For the huge majority this is irrelevant.

It provides a consistent mental model across frameworks for building front-end applications via CLI.

Re: Create React Apps with No Configuration

#154
This is great. One of the biggest hurdles is getting started which is why there are so many react boilerplates. It would be awesome to see projects like this grow so that it would auto configure based on libraries you would like to use. Want to use Redux? Just run the `create-react-app -m redux hello-world ` and you would get everything with the addition of redux and it's configuration.

Re: Create React Apps with No Configuration

#155

Earlier quoted context omitted.

I've done a lot of React but have since been burned out by it. It takes so much configuration just to set up something basic like server side rendering. After a year of hacking around with React and wallowing through the pain, I decided to just use Django and django templates. React is nice for a whole company that has one app with a tough initial setup but great performance in the long run, but its hard for individu…

> It takes so much configuration just to set up something basic like server side rendering. Is server side rendering basic or necessary in most "tiny" apps?

> Is server side rendering basic or necessary in most "tiny" apps?

Isn't it both?

Re: Create React Apps with No Configuration

#156
post #57

Earlier quoted context omitted.

Kind of interesting to think about the two projects and how they diverge based on the core developers. Ember is made by folks who work on / for small and medium companies[1]. They don't have the build infrastructure Facebook does and are able to create an anointed solution in Ember-CLI because they'll use it daily. React is stuck in a place where the environment it's developed in is unique from what any other user wi…

> There's no official path from view layer -> complete app (no guidance for data flow, how to communicate with the server, server side rendering, routing on the client). Every time I've decided to take an afternoon to poke at React this is where I've given up. I totally understand the model and appreciate how useful it can be but I've never been clear about how to actually hook it up to a backend that isn't just the…

I think this is common. For me the front page and JSX threw me off. React was so un-opinionated that it can loose its appeal when it presents itself. Once I took an opinionated tutorial it became much clearer to me.

Since then I've used React in conjunction with Django, PHP/Laravel, converted large jQuery codebases to React and created frontend-only sites. I've not yet gone full-on with a NodeJS back-end and isomophic and that's fine for now.

Pass your data into a root component via props. Or use XHR requests to load data from your backend into your root component and manipulate them in your state. Let the data changes in the root component trickle down via props. Keep it simple with React loaded via a tag and work from there.

Re: Create React Apps with No Configuration

#159

Earlier quoted context omitted.

Lack of testing is a pretty big oversight given how helpful testing is for someone getting started. Hopefully it is easy to just add mocha on top of this with out any mucking around?

It shouldn’t be too hard. This is not an oversight, we literally developed this project in a single week. We plan to add testing, just need to decide on the runner and good defaults: https://github.com/facebookincubator/create-react-app/issues... .

blushes oversight was a bad choice of a word. I'm excited to see this and excited to see testing tools a part of it.

Re: Create React Apps with No Configuration

#160

Earlier quoted context omitted.

We think ES6 is not the problem here. It’s just a language, and arguably a better one than ES5. The problem is the low level tooling around it. This is what we’re trying to fix with this project. Hopefully you’ll give it a go, and maybe it will give you just as much enjoyment as using tags. If not, please let us know how we can improve. It’s not linting/transpilation/bundling that’s bad, it’s that it’s hard to do the…

Oh no, I love (most of) ES6 and enjoy it when something shows green on caniuse. But I dropped Babel/Webpack from my build and (personally) determined that not needing to deal with configuration, deprecation, etc. messages in my terminal was worth the +0.005s to initial render and using tags in my index.html file. That being said, I'll likely give this a spin tonight for somerandomcrappyidea.js and provide you guys so…

Are you still using JSX? Even a very minimal babel/webpack setup like this one has really sped up my productivity, but I'm interested in the alternatives...
Post reply on HN