22

Why the hell does every single frontend job on Earth require expert knowledge of React, a fad JS library that will be forgotten in 5 years?

For extra credit: when was the sage advice of "keep content, appearance, and behavior separate" overruled in favor of "use JavaScript for literally everything"? Have I been in a coma for the past 3 years?

Look, I understand the appeal of separating code into repeatable components. I just don't understand why essentially the same thing can't be accomplished with vanilla JS, which is ten times easier to understand and doesn't require an entire website to be written in some make-believe offshoot of Ecmascript that will look like hieroglyphics a decade from now.

There are also seemingly no positions that offer people a platform to start applying React to real world scenarios. I've seen the "understand React in 5 minutes" articles. Wow, super cool, you used 30 lines of JavaScript to render a "Hello world" div. The possibilities are truly endless.

But seriously, how does this shit work? Where do I go to learn the mystical art of offloading every single one of a website's responsibilities to JavaScript? How do I use React to build an actual functioning website, and at what point will it save me time or increase my productivity instead of just pissing me off?

Comments
  • 4
    React shouldn't be used to build entire websites. At all.

    It's useful for dynamic applications where you're loading and reloading data into specific HTML structures that need to be rebuilt quickly and often.

    I've used it for the dynamic cart popout in WooCommerce sites, for example.
  • 4
    @boylett This already makes so much more sense. I think my problem is that all the React tutorials I've found show you how to build things that don't benefit from being built with React, at all.

    Where do you get data from? Just AJAX?
  • 1
    @spritanium Yeah it's hard to find a decent react tutorial. Even the website is pretty vague.

    I usually do a jQuery or XMLHTTP ajax call to get some juicy JSON data and just pump it straight into a react component.
  • 4
    @boylett I never even considered using React together with jQuery but I suppose it makes sense for WooCommerce.

    Your two comments have been more useful than the entirety of information I've found prior to this post, lol
  • 0
    I know shit about react (except that react native is pretty ok), but vue saves me a lot of time when im using it with a rest backend. But im mostly doing templating, so thats a given.
  • 1
    Ok, so there are a lot of legit questions in there and some bad assumptions so I will try to answer them all.

    1. Why would you use React?
    - Lots of reasons. Most importantly the Virtual DOM

    2. Where can you learn more than just beginner React?
    - For free, likely nowhere. If your a professional dev with money to spend on learning then...
    - Pluralsight has a whole track to take you from beginner to expert. About 30 hours of videos.
    - Some really good course on UDemy.

    3. How long will it take to stop being annoying?
    - like any framework it will take work. Once you build a good site is ES6 using Redux for state manipulation then it will be fun.

    Bonus: Learn Redux now.

    The assumption: React will be dead soon.
    - This one is false, sure a better framework could come along and do things better, but it was my knowledge of Angular that made React easier to learn (from the diffs) and knowing Ready made Vue easier to learn.

    Employment will be hard if you hate the popular frontmen frameworks.
  • 2
    @sharktits Vue always seemed cooler to me, unfortunately React is what everyone seems to be looking for.
  • 1
    @spritanium WooCommerce makes jQuery mandatory so may as well use it haha.

    Glad I could help! I've been considering writing some more realistic React examples on CodePen, do you think that would be helpful at all?
  • 1
  • 1
    @spritanium Links

    https://pluralsight.com/browse/...

    https://www.udemy.com/react-redux/

    Also, read or watch ANYTHING by Cory House! He is awesome!
  • 1
    @boylett Yeah, CodePen is great for understanding how things work. I'd definitely take a look
  • 0
    @leanrob Thanks for the help!
  • 1
    react is not about components or even virtual dom. its about dealing with application state first.
  • 0
    Try to create a modal with react.

    Then you known react.
  • 0
    Those jobs are shitholes. But you can apply to them without knowing shit...

    No one has expert react knoweldge. Read the tutorial learn the idea: states and virtual dom. Tadaaam expert.

    Learn Javascript and you will understand what are the limitations of these kind of frameworks.

    And react for a non intensive website that doesnt work with 2000 elements on the fly in 1 sec... Is overkill
  • 0
    My preference is Vue. Single file components for the win!
  • 0
    You must be a moron if you are hating on React. We believe in mixing html, css and js (dont foget states, context, consumers, providers) into a single file. This allows for faster loading, MVC is not something you need to think about or separation of concerns, you're a noob
Add Comment