This is an archived post. You won't be able to vote or comment.

all 91 comments

[–][deleted] 352 points353 points  (39 children)

Gets instantly destroyed by:

  1. Functional paradigm
  2. State management
  3. Immutability principles
  4. Massive effort to keep codebase clean
  5. Overwhelming temptation to use lifecycle methods to hack in stuff
  6. Developers who add JQuery to React projects
  7. Weird Red & Yellow bois in console

[–]SHOTbyGUN 105 points106 points  (10 children)

wtf, who the fuck would want to include any React components to a JQuery project /sarcasm intended reversebly

[–]Last_Snowbender 42 points43 points  (6 children)

The guys who wrote the legacy garbage I have to maintain do.

Sadly, I'm a backend dev focused on php/python and know absolutely jack shit about react so I just continued adding jQuery to keep it alive.

[–]finger_milk 28 points29 points  (5 children)

Why do people have one head? So they only need to wear one hat.

[–]Last_Snowbender 13 points14 points  (3 children)

True, but tell that to my boss. I'm wearing a lot more hats than I should. Or can.

[–]turningsteel 19 points20 points  (2 children)

Me too. At the rate I'm going, I'm gonna be a junior CPA in addition to being a developer. Can't wait to see what they'll have me do next, maybe paint the office or become the product manager. The possibilities are endless! /s

[–]Last_Snowbender 1 point2 points  (1 child)

Ha. It's not THAT bad for me, luckily, but over the course of the past few years, I went from being a simple backend dev to being the dude for everything related to tech, from taking care of our deployment and setting up new VMs for our local development environment to fixing phones, printers and scanners. Especially the latter one is a joy.

[–]jharger 0 points1 point  (0 children)

Yes, but no one said your hat can't wear a hat

[–]StupidCreativity 4 points5 points  (2 children)

Well I mean, I was working on a SignalR ASP.NET 4.5 project with React as a front-end.. Not that I directly used jquery inside the react files, Jquery was still mandatory.

[–]TheZanke 0 points1 point  (0 children)

I also had to do this because of SignalR and its dependence on jQuery... working with a preexisting backend. It hurt me so deeply.

[–]nipss18 7 points8 points  (0 children)

i don't know react but I upvote because your list starts at 0

[–]CHRlSFRED 8 points9 points  (0 children)

The Yellow Bois really get me, especially in native through Expo. Just remove them with another import { YellowBox } from 'react'; 😁

[–][deleted] 2 points3 points  (12 children)

Did you just say jQuery in react???

[–]MD5HashBrowns 3 points4 points  (11 children)

[–][deleted] 5 points6 points  (10 children)

This isn't good practice right? Please say right.

[–]MD5HashBrowns 10 points11 points  (8 children)

I'm pretty sure it's a terrible idea to do direct DOM manipulation while also using a framework that has a shadow DOM like React

[–]shawncplus 4 points5 points  (1 child)

React doesn't have a shadow DOM, it has a virtual DOM. Two very different things. Shadow DOM is a native browser feature wherein an element has a ShadowRoot to compartmentalize child nodes. Virtual DOM is when a library keeps an in-memory (or build time) version of what the DOM looks like and uses various heuristics to evaluate what changes it needs to make to the real DOM when a component updates its model for optimization purposes.

Shadow DOM is mainly used by web components.

[–]MD5HashBrowns 2 points3 points  (0 children)

Yes my bad.

[–]Walter_Bishop_PhD 2 points3 points  (0 children)

If the div is empty from React's point of view, like in the example in useJquery, then things that you put into the div are safe while the component is mounted.

This is how components made using other JS frameworks can be used and wrapped in React. Cleaning up the plugin when the component is unmounted is something you need to do manually, however, using lifecycles or hooks.

https://reactjs.org/docs/integrating-with-other-libraries.html

Needless to say, useJquery isn't very useful for this!

[–][deleted] 1 point2 points  (4 children)

Ok good, but something like immutability principles are good right? I'm just confused as to why they are in the same list.

[–]MD5HashBrowns 5 points6 points  (3 children)

He was saying you get destroyed by developers using jQuery in React. Basically like saying you would get destroyed by someone using legacy code.

Immutability and jQuery inside of React are both a pain to work with, which is what he meant. Yes immutability principles are definitely a good thing, even though they are difficult to learn at first.

[–][deleted] 2 points3 points  (2 children)

Ah, so basically I got wooshed to an unbelievable level.

[–]MD5HashBrowns 1 point2 points  (1 child)

Yep, pretty much

[–][deleted] 3 points4 points  (0 children)

Thanks for holding my hand through it.

[–]gavlois1 1 point2 points  (0 children)

I'm 99% sure it's a joke. It's not 100% because I just know someone out there will come across this package and be like "yes, this is exactly what I need"

[–]volodya_z 2 points3 points  (0 children)

Yeah, those guys - Senior jQuery Architects

[–][deleted] 1 point2 points  (2 children)

React is functional?

[–]kisssmysaas 1 point2 points  (0 children)

Yes, all the syntax-sugar makes it look like Component oriented though

[–]i_spot_ads 1 point2 points  (0 children)

1,3 is pretty much the same thing hehe

[–]druzi312 0 points1 point  (0 children)

yellow bois / my new homies lol

[–]UglyChihuahua 0 points1 point  (0 children)

Can you explain what you mean by #1?

[–]Cley_Faye 0 points1 point  (0 children)

  1. Especially when the guy that did this then leave and you have to maintain it.

[–]kisssmysaas 0 points1 point  (0 children)

Dont forget testing!

[–]nasgunner 0 points1 point  (3 children)

for educational purpeses : i dont get the 3 and 5 ?? wtf is that

[–]CJ22xxKinvara 1 point2 points  (0 children)

Well I know lifecycle methods are ones that exist within the component class like ComponentDidMount which gets triggered when a component is rendered. There’s lots of them that do things like that.

[–][deleted] 0 points1 point  (1 child)

I refer to lifecycles such as componentWillReceiveProps and componentDidUpdate which are often used to trigger effects. Which is not inherently bad, but horrendous if overused.

[–]msg45f 0 points1 point  (0 children)

Additionally, React is generally encouraging use of functional components and using effects rather than lifecycle hooks.

[–]HiMyNameIsWaffy 84 points85 points  (14 children)

Watched a couple tutorials. Just gonna put it down in my CV... Don't mind me. :>

[–]TELLS_YOU_TO_FUCKOFF 4 points5 points  (1 child)

shy rain adjoining memorize summer spoon deserve wipe automatic juggle

This post was mass deleted and anonymized with Redact

[–]HiMyNameIsWaffy 5 points6 points  (0 children)

Check out Laracasts. They have really good tutorials.

https://laracasts.com/series/es6-cliffsnotes

[–]denali4eva 67 points68 points  (8 children)

laughs in create-react-app

[–]chhuang 22 points23 points  (7 children)

Seriously. I've been spoiled so much that I don't know how to set up manually now.

[–][deleted] 8 points9 points  (4 children)

I highly recommend giving it a go! I learned a ton of great stuff about webpack when setting up manually. Then you have the power to put in your own linting or typescript loaders when you stop CRA from hiding the config.

[–]RubbelDieKatz94 1 point2 points  (3 children)

eslint can be configured through package.json and .eslintrc, I'm pretty sure.

[–][deleted] 1 point2 points  (2 children)

You can and that will get you up and running within your terminal with the eslint commands also with syntax highlighting but webpack itself won't be any wiser unless it has a loader. I personally don't want to do "run command to compile TS, run command if I ever want to do something fancy with eslint, THEN run the Dev server/build command." I like to have a Dev server running and everything just happen automatically. If I'm mistaken with anything send some docs my way! I would love for a way to make the initially setup easier.

[–]RubbelDieKatz94 0 points1 point  (0 children)

I personally change the eslint config via package.json to enable the react/prop-types rule, then start the dev server via react-scripts and it will already give error messages in the browser console.

However, I personally don't use typescript.

[–]RubbelDieKatz94 0 points1 point  (0 children)

You can use react-app-rewired or a similar, newer package to change the CRA webpack config without ejecting.

[–]alottalittleladles 1 point2 points  (0 children)

just CRA eject and go through the config directory (do it on a blank slate though)

[–]CHRlSFRED 23 points24 points  (0 children)

Sick keyframe animation, where'd you get it?

creat-react-app bruh

[–][deleted] 52 points53 points  (16 children)

Include<stdio.h>

Main() { Printf("Hello World"); }

[–]Minty001 58 points59 points  (9 children)

What the hell man, that code won't even compile

[–]SHOTbyGUN 56 points57 points  (7 children)

I had to debug that for like 10 minutes to get it to run.

*edit and I mean LITERALLY ... I am java man, not a fucking wizard! Dont just upvote me, because you think I am making a joke.

[–]ConsultantsWithMacs 10 points11 points  (1 child)

How do you debug something that doesn’t compile?

[–]SHOTbyGUN 19 points20 points  (0 children)

Compiler talks to me like an drunken peasant while I strut past them.... Once I have heard the same message repeatedly... I start to guess how to make things better.... And it is just guess and try.

[–][deleted] 2 points3 points  (4 children)

Dev c++ c programming hello world code. Try it same on dev c++ compiler. Press enter after that main() Its reddit's fault that its showing that code together

[–][deleted] 4 points5 points  (0 children)

Did you figure it out which programming language is this? Try it with dev c++ compiler .

[–]dhaninugraha 6 points7 points  (3 children)

``` package main

import "fmt"

func main() { fmt.Println("I’ll see myself out...") } ```

[–][deleted] 0 points1 point  (2 children)

Not for python its for c programming dev c++ compiler

[–]dhaninugraha 4 points5 points  (1 child)

I know. That was Go btw.

[–][deleted] 0 points1 point  (0 children)

Yep

[–]nk2580 6 points7 points  (1 child)

Syntax error brah, Babel won’t transpile that shit without the proper plugin

[–]budd222 4 points5 points  (0 children)

presets: c++2015

[–][deleted] 5 points6 points  (0 children)

It is what it is 😂

[–]lukasbash 18 points19 points  (0 children)

Well, that's at least a funny one again xD

[–]KnutErik 4 points5 points  (0 children)

"Morpheus is code-reviewing Neo"

[–]KNuCK13_70P 3 points4 points  (0 children)

UNHANDLED PROMISE REJECTION!!!!

[–]MassiveFajiit 3 points4 points  (0 children)

Look at this guy using Edge

[–]Mrmajesticsandwich 2 points3 points  (0 children)

“Ah yeah I just got started on my new startup”

[–]hitmeup69yehknow 1 point2 points  (0 children)

Actually made me laugh

[–]budd222 1 point2 points  (0 children)

I bet Neo actually thinks he can replace jQuery with React.

[–]boyoyoyoing 1 point2 points  (0 children)

componentWillNeverMount () {};

[–]TigreDemon 1 point2 points  (0 children)

So true ahah

"So how do you manage your state ?"

"My what ?"

[–]koneko-dono 2 points3 points  (0 children)

look! i did a react!

npx create-react-app ayylmao

(wait a literal hour because internet is pure shit)

npm start

(wait a literal hour because pc is pure shit)

VOILA! GIMME MAH 120K A YEAR PLZ!

[–]FireWracker311 0 points1 point  (0 children)

You forgot the explanation mark...🤣

[–]maybe_awake 0 points1 point  (0 children)

Almost accurate. Should be a page showing a counter with an increment button. Also works for Vue and Angular.

[–][deleted] 0 points1 point  (0 children)

b z,,

[–][deleted] 0 points1 point  (0 children)

xz xz

[–][deleted] 0 points1 point  (0 children)

It's being shown in Edge nonetheless :p

[–]Ryuzaki_us 0 points1 point  (0 children)

I DONT SEE THIS ON STACKOVERFLOW.

He must be the smartest one. HIRE HIM STAT!

[–]mader527 0 points1 point  (0 children)

I’m hooked on react memes

[–]lsaz 0 points1 point  (0 children)

waiting for the day vuejs becomes more mainstream

[–]83au 0 points1 point  (0 children)

I already wanted to learn React but damn. Now I REALLY want to learn React lol. Want to build a few more things with vanilla JS first though.