Create React Apps with No Configuration
231–240 of 250 posts
Re: Create React Apps with No Configuration
#232This is actually pretty huge. #1 complaint/barrier/hate with getting started with React is all the tooling to do it "the right way" Kudos to React team for bringing a superior pattern and making it actually practical to use.
I'm really hoping to see the React team make React more user friendly. Maybe an all in one React framework much like Meteor, where you can just do `react createapp myapp` or something and start coding right away.
Ditto for Redux. They're both low-level building blocks that could benefit from some official "opinions".
Re: Create React Apps with No Configuration
#233Earlier quoted context omitted.
One thing though, is that the standard classes are just not up to the job without a lot of stuff tacked on. Eg: the function binding problem pushes people to use class properties, which aren't yet a standard, and then they hit walls with tools that don't support them (eg: I dunno if it's still the case, but for a while class properties caused issues with Flow). createClass might not have been the answer, but on top o…
There was not such thing like ES3 module syntax. This is just programming pattern many people used: https://addyosmani.com/resources/essentialjsdesignpatterns/b... It was a great idea back then, but that was never syntax. This and similar patterns rely on the fact JavaScript is very dynamic and flexible language and enables creating closures and creating objects dynamically. These are very powerful features of langua…
In other words, classes in JavaScript are a poor substitute for static types, and should not be used that way. That's why a lot of React people are using flow, and a lot of Angular people are using TypeScript.
Re: Create React Apps with No Configuration
#234Earlier quoted context omitted.
React's lifecycle methods and other similar features require some kind of "object instance" to exist. Since React was created prior to ES6, the React team created their own "inheritance"-ish approach, which is something that every JS library out there was doing as well. One of the main arguments for classes being included in the ES6 standard is that it's a common approach that libraries can converge on and use togeth…
Exactly. We don't like classes, but we don't like "pseudo classes" (createClass) even more. Better the devil that's standardized. We already offer a way to create stateless components with just functions. We will keep exploring that space and eventually might have a class-less solution we like that satisfies all our use cases.
Several React libraries are already doing that. In spite of all our warnings, people are trying to extend classes for React views, and use `class` in the rest of their code, as well, moving it into the state layer, and modeling their business domains with them instead of using pure functions and Redux.
`class` affords `extends` like balls afford throwing and chairs afford sitting. When you ignore the power of suggestion that comes with the tool affordances, you point users in the direction of trouble.
Sadly, scaling developer education is a lot harder than it seems from inside our ivory towers, surrounded by smart colleagues well-versed in programming wisdom and design patterns.
Re: Create React Apps with No Configuration
#235This is the most exciting thing to come out of the ReactJS project since it started. The very best investment a technology platform can make is onboarding new developers. ReactJS is recognising that and it's great news that they are making the hardest bit easier. I whined a while back on exactly this topic. "Babel 6 - useless by default - a lesson in how NOT to design software. " http://fourlightyears.blogspot.com/20…
Re: Create React Apps with No Configuration
#236Earlier quoted context omitted.
What’s wrong with using webpack under the hood? The problem is webpack being a lower level tool. This is why we abstract it away from you (and we can swap it for something better if it comes along, but actually webpack is pretty powerful).
We discussed this on Twitter Dan, fyi, no need to rehash here. But they very fact you had to spend time abstracting away WebPack speaks volumes IMO...
>But they very fact you had to spend time abstracting away WebPack speaks volumes IMO...
Speaks volumes about its poor public API. I don’t understand how this this affects create-react-app, really.
But if you can suggest something better that solves the same problems, please do.
Re: Create React Apps with No Configuration
#237Earlier quoted context omitted.
I actually use browserify for personal projects. It's ultra simple to get started. My boss insists on using webpack.
If you don't care about the stupid arbitrary bundling system for other assets (like CSS and images) that WebPack has (and you shouldn't: it's an awful code practice) then yes... Browserify is literally better in every way (other than tree shaking)
The “stupid arbitrary” system has a number of benefits. It revs your assets for production automatically with content hashes. It saves you from filename typos because all assets (CSS, images) are part of the same build pipeline. It throws on parse errors in CSS as part of your normal dev flow, not at some later stage. It allows for fast hot reloading of styles in development.
The only downside I’m aware of is that it doesn’t work with some other tools without special plugins or configuration. Well, you have to pick your tradeoffs, right? I’d love to talk about technical tradeoffs of both systems but your comment reads more like a knee-jerk reaction than a technical assessment.
Re: Create React Apps with No Configuration
#238Earlier quoted context omitted.
Many people (especially beginners) appreciate automatic updates of their dependencies. If you eject straight away you’ll have to manage them yourself, which is a big turnoff to many.
Could there be some sort of npm feature that incorporates a remote list of dependencies & versions?
Re: Create React Apps with No Configuration
#239Earlier quoted context omitted.
And now working for Facebook, one of the most active members of the react team at that.
Facebook created React.
They say that Dan, at Facebook, is one the most active members of the React team.