[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Is React a meme-tier web dev paradigm? What ever happened to

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 70
Thread images: 7

File: react.png (791KB, 1264x1608px) Image search: [Google]
react.png
791KB, 1264x1608px
Is React a meme-tier web dev paradigm?

What ever happened to separation of concerns?

Has anyone here used React for something beyond TodoMVC?
>>
File: 512px-Elm_logo.svg[1].png (6KB, 512x512px) Image search: [Google]
512px-Elm_logo.svg[1].png
6KB, 512x512px
>>58101096
>What ever happened to separation of concerns?
>>
>>58101096
What the fuck kind of programming is this?
This isn't JS right?
>>
Web Dev is meme tier
>>
I don't see a problem with this. This is how I want to build websites. You don't need HTML and CSS, js does all that.
>>
>>58101372
Wait, how the fuck do you do anything serverside?
Databases?
Input sanitation?
User accounts?
>>
>>58101096
>programming
>>
I made a medium sized app in react. When I first heard about it I thought was it was another pointless flash in the pan JS framework.

After giving it a shot I would recommend it for any medium to large sized JS application. You can component UI elements off, and structure them in a way that doesn't cause weird behaviour. Also it's fast. Weirdly fast (hence the name?).

You'll also want to use a bundler and compresser like browserfy.

in OPs image, this is the 'old hat' way of thinking about web development. Traditionally everything is rendered by the server and javascript is an optional extra. Now browsers are more advanced the heavy lifting can be done by the browser and communication can be done with ajax or websockets. If you do it right, you'll have a faster more responsive experience.

7/10 would use again.
>>
File: steal_his_look.png (581KB, 1244x731px) Image search: [Google]
steal_his_look.png
581KB, 1244x731px
>>58101372
liek this?

$('body').html('<h1>Hello World</h1>')
.css('color', 'fuchsia')
.css('font-family', 'Comic Sans MS')
.css('font-size', '72px');
>>
>>58101096
Thomas Fuchs is a literal Ruby developer. His greatest accomplishment in JS is a jQuery clone geared towards perf which is incredibly easy since you don't have 10 years of technical debt to start with. He is very behind times and his post is equivalent of "get off my lawn."
>>
>>58101411
Serverside js?
>>
>>58101411
>Wait, how the fuck do you do anything serverside?

By having an API?

>Databases?

API.

>Input sanitation?

API.

>User accounts?

API.
>>
>>58103342
what api do we use to import and load the apis?
>>
>>58101096
Okay grandpa, we'll be sure to keep that in mind.
Who here /virtualDOM/
>>
>>58103342
left-pad issue was not enough, stop being stupid
>>
>>58101096
me. Working with React.
Using HTML, CSS, JS in one file is truly garbage. But!...
React propose 'component' concept, where whole website diveded on little components. In that case its very useful and cool. Because there is not so much code, and you can mix htmlcssjs.
Besides you have one language, one linter, easy catch errors.

Sory 4 mai ingilsh
>>
>>58103495
Npm
>>
what's really weird is that angular has everything separated and does the same things react does (and more) but suddenly there's a push for react.
>>
>>58104344
>Facebook actually uses React
>Instagram uses React
>Google doesn't use angular
Sends a pretty clear message as to who has faith in the product they've developed. Angular is a designated shitting street too
>>
>>58103652
>Using HTML, CSS, JS in one file is truly garbage. But!... you can mix htmlcssjs

What?

I like that React is built upon ES6+ and that it uses a virtual DOM. That's a plus compared to Backbone, which I am still more comfortable with

The open invite to violate separation of concerns and the shady license is an issue, though.
>>
>>58101096
The whole towering stack of web technologies starting from HTTP is a fucking joke.

In a perfect world everyone would learn C, and ideally some higher level level language like C++, Python or Lua, and everything would be fine.

But no, "it's outdated!" say some retards, who really mean "it's too hard to learn and I don't get it, so I'll hide the complexity beneath layers of frameworks until you have to use an early 00's supercalculator to send 140 character long messages on Twitter but I'll feel better about myself because the code is only two lines long".
>>
>>58105001
>>58105001
https://www.youtube.com/watch?v=x7cQ3mrcKaY

JSX isn't HTML, JSX is just syntactic sugar for the DOM in JS. React should solely be concerned with presentation, hence no need for separation.

And yeah, the license is shit but you could always use an alternative like preact or inferno.
>>
>>58106666
nice waste of quads you faggot neck yourself
>>
>>58106666
>preact or inferno
Thanks!
>>
File: 1480915728832.jpg (75KB, 1280x720px) Image search: [Google]
1480915728832.jpg
75KB, 1280x720px
>>58106688
suck my dick, whore
>>
>>58104902
https://www.madewithangular.com/#/categories/google
>>
>>58101096
Wait, I thought the entire point of these new JS frameworks was to write TodoMVC in as many of them as possible.
>>
>>58108096
/*jshint quotmark:false */
/*jshint white:false */
/*jshint trailing:false */
/*jshint newcap:false */
/*global React */
var app = app || {};

(function () {
'use strict';

app.TodoFooter = React.createClass({
render: function () {
var activeTodoWord = app.Utils.pluralize(this.props.count, 'item');
var clearButton = null;

if (this.props.completedCount > 0) {
clearButton = (
<button
className="clear-completed"
onClick={this.props.onClearCompleted}>
Clear completed
</button>
);
}

var nowShowing = this.props.nowShowing;
return (
<footer className="footer">
<span className="todo-count">
<strong>{this.props.count}</strong> {activeTodoWord} left
</span>
<ul className="filters">
<li>
<a
href="#/"
className={classNames({selected: nowShowing === app.ALL_TODOS})}>
All
</a>
</li>
{' '}
<li>
<a
href="#/active"
className={classNames({selected: nowShowing === app.ACTIVE_TODOS})}>
Active
</a>
</li>
{' '}
<li>
<a
href="#/completed"
className={classNames({selected: nowShowing === app.COMPLETED_TODOS})}>
Completed
</a>
</li>
</ul>
{clearButton}
</footer>
);
}
});
})();


wtf

<footer>facebook (c) 2016</footer>
>>
>>58106718
Aside from fonts and trends there's nothing of consequence. 90% of those """"""web apps"""""" could have been produced in WordPress, they're basically pamphlet sites
>>
I've used Vue.js for a couple things beyond Todo list apps. It's not completely terrible, but there are a few gotchas with the order that it renders shit that makes me want to tear my hair out.

React and Angular can go fuck themselves tho
>>
>>58106261
>In a perfect world everyone would learn C
You must really love security holes and hard to find bugs.
>>
I just use Ember.
>>
File: 36c.jpg (84KB, 907x661px) Image search: [Google]
36c.jpg
84KB, 907x661px
>>58111658
>Framework
>Library
>Framework
>>
React is not alone here.
It's what you're building. You're building an application in the web browser. It simply wasn't designed for it.

For a todo page no framework is necessary but this is from an example.
>>
Frontend dev here: The only good part of React is the Virual DOM, the rest is absolute fucking garbage.
>>
>>58112213
take your jquery shit elsewhere grandpa
>>
>>58112390
I'm currently supporting 4 sites with 3 different stacks:

KnockoutJS
Angular 1.2/1.5
ReactJS

Guess which one is the worst to work in by far?

Hint: It's React.

It's basically the Javascript hype machine ruining everything. 4 years ago there were at least 20 different 2 way binding libraries (remember Batman.js?) and now it's Reacts turn in the spotlight.
>>
>>58112191
Actually React is completely alone here with how it renders.

Take a look at how KnockoutJS or Polymer do web components.

You can easily have separation of concerns in SPAs.
>>
>supporting applications build with ASP.NET MVC
>C# with C#, HTML with HTML, CSS with CSS, JavaScript with JavaScript
>everything nice and tidy

truly the greatest feeling
>>
>>58112506
This is truly the GOAT setup.
>>
angular 2 is way way waaaay better
>>
React is so comfy to develop with compared to new angular.
>>
Is Angular 2 going to end up in the Best Memes of 2016 collection as well?
There doesn't seem to be a lot of push towards it
In fact, there doesn't seem to be any push towards it
>>
>>58112588
Its a meme, it will vanish quite quickly I think. When I look at the syntax I immediately see it was designed by pajeets.
>>
>>58103310
What does the kool-aid taste like?
>>
>>58112696
Curiously enough, it tastes just like the regular kool-aid you're used to.
>>
>>58101096
React and Angular are abominations. The two frontend libs/frameworks that get close to good are Ractive and Vue.
>>
>>58112629
> look at the syntax
> make a conclusion
mmm...
>>
>>58112454
Maybe you just don't know how to code in React?
>>
>>58113175
>want to load a website
>Need to load a billion different javascript files
>A bunch of these files (or at least, large portions of the files themselves) aren't even being used
>Some websites literally have loading screens now

Web development is moving in such an ass backwards direction
>>
>>58101096
no it's pretty good
>>
>>58113285
LOL you're adorable ;)
>>
>>58113302
Assuming you use ES6 modules (import X from Y) and not CommonJS modules (var X = require(Y)) and don't do retarded stuff like "import module" or "import * from module", you can tree-shake Angular2 bundles and (allegedly) reduce their size heavily
Haven't tried it yet, though
>>
>>58111683
>the point
>[distance]
>(you)
I think He's saying in a better world programmers would have to deal in languages that take skill to use. Imagine what javascript would be like if it required real talent to use.
>>
>>58101096
Dem curly brackets tho
>>
>>58103953
or Web2py DAL
>>
>>58109906
footer is a valid tag, get on with the times
>>
>>58101096
At work (very large corporation) our UI team chose React w/ Redux and Popsicle. They seem to like it. The whole mishmash of js frameworks seems a bit complicated, but it's evidently fairly modular.
>>
>>58112588
It's really nice to use AFTER you get it all set up. But there's a TON of boilerplate.

Your looking at like 4 config files minimum, and another 3-4 component files just to get hello world. And then when you have a few hundred components it starts taking like 10+ seconds to recompile every single time you make a code change.

Also, let's not forget that core design paradigms of the language were changed in RC4, making anything (tutorial, library, code) written before that completely non-functional.

I would never use it on anything except the largest web applications. There's just no way to justify the amount of setup and boilerplate involved when other libraries exist.
>>
>>58114791
>And then when you have a few hundred components it starts taking like 10+ seconds to recompile every single time you make a code change
I thought using a dynamic module loader like they seem to do in most of their examples/tutorials would alleviate that problem. Or do you mean bundling? Haven't really used Angular2
>>
>>58114699
Modular isn''t necessarily a good thing. It just means that there is that much more extra glue holding everything together that needs to be maintained.
>>
>>58114883
It doesn't. Their examples work fine until you have 700+ typescript, css, and html files the server needs to request every time you hard refresh the page (this takes 25-40 seconds, even locally). HTTP/2 may help in this regard when our backend supports it.

Compiling the files with lazy loading is what we're doing now (breaks the js into chunk files and only compiles what it needs to based on the dependency chain) and it takes 10-20 seconds depending on what you change.

Then there's ahead of time compilation, which is the fastest on the client side, but also takes about 30 seconds for each recompile. We can't even use this option anyway because some of the libraries we're using don't support it.
>>
File: 1480990319451.gif (2MB, 400x250px) Image search: [Google]
1480990319451.gif
2MB, 400x250px
>>58101442
I agree. i'm a backend dev but i work pretty closely with our front end and he uses react for everything, and our UX is pretty smooth in my opinion.

I took on this little project as part of our end of year sprint so I do have some experience with it too. As a non-web developer, I really like how each component/class does all the rendering dynamically instead of having static files or fucking templates.

>>58101096
who is this guy? why should I care about his opinion? isn't this just the same bullshit argument everyone uses when things change over time?
>>
>>58115063
>10-20 seconds depending on what you change.
As a native app developer that sounds horrendous.
>>
>>58114947
Yea, I was of the same opinion. But they feel like the tradeoff is worth it. They've already traded out several things.
>>
>>58102180
haha
>>
>>58106261
>starting from HTTP is a fucking joke
Nothing wrong with HTTP.

>In a perfect world everyone would learn C, and ideally some higher level level language like C++, Python or Lua, and everything would be fine.
Drop C++. But on general, yeah.

>But no, "it's outdated!" say some retards, who really mean "it's too hard to learn and I don't get it, so I'll hide the complexity beneath layers of frameworks until you have to use an early 00's supercalculator to send 140 character long messages on Twitter but I'll feel better about myself because the code is only two lines long".
Agree.
>>
Modern javascript frameworks are part of the cancer killing the web.
>>
>>58113843
>Imagine what javascript would be like if it required real talent to use.
>web devs try anyways
>bug where arbitrary code gets executed on every client machine

t-thanks
>>
Isn't Reactive programming pure functional programming with unit testing in mind exactly what all the muh strongly typed js variant douchebags love?
Thread posts: 70
Thread images: 7


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.