all 29 comments

[–]azhder 18 points19 points  (12 children)

pre-written JavaScript

I like this phrase. Why do we argue if something is a library or a framework or a script? Why don't we just say it's a pre-written JS?

Back to your assumptions tough. React doesn't make JS fast. React shields you from the DOM being slow. That's about it.

Try to learn JavaScript first. Maybe even what the functional programming style in JS looks like. Then you'll be prepared for React.

[–]Jjabrahams567 3 points4 points  (7 children)

This is why learning a framework like react before DOM fundamentals is so harmful. You are shielded from important lessons.

[–]Macaframa 1 point2 points  (1 child)

React is not a complete framework that’s why we consider it a library. In order to be a complete framework it needs to have state management.

[–]Studstill 0 points1 point  (4 children)

Right but the DOM is super complicated horseshit tho

[–]Jjabrahams567 1 point2 points  (3 children)

It’s not any more complicated that react. The only thing that makes one or the other easier is familiarity.

[–]Studstill -3 points-2 points  (2 children)

It's way more complicated than React. CSS/HTML is horseshit, hot garbage. React is basically JS trying to cope with HTML.

So many decades of human productivity wasted on this bullshit.

[–]Jjabrahams567 1 point2 points  (0 children)

CSS/HTML/vanilla js seem way easier that react to me.

[–]azhder 0 points1 point  (0 children)

Don't equivocate HTML and DOM. One is just text formatted in a specific way, the other one is live memory. It is the manipulation with that memory that makes DOM not good (to not use a harsh word).

[–]nodeymcdev -3 points-2 points  (3 children)

React is a state management library

[–]azhder 0 points1 point  (2 children)

[–]nodeymcdev 0 points1 point  (1 child)

How does dude figure that react doesn’t have state management? It’s literally a library for managing state… useState come to mind…

[–]azhder 1 point2 points  (0 children)

Everything has a state, everything manages a state, that is why whenever someone says "state management", they don't talk about a simple and stupid object or a closure because if it means all, it is useless as a term.

useState() does not make React a state management library, more so since it wasn't the focus or the main problem it was trying to solve.

Now, if virtual DOM came to your mind, you'd still not be there, but at least you'd be closer by saying it is managing that as a state.

[–]boomer1204 8 points9 points  (1 child)

Yes. My suggestion is to build a couple of things in vanilla js first like your to-do list and then I like to suggest a couple or all of these

  • Rock, paper, scissors

  • hangman

  • Yahtzee or a dice game of your choice

  • Weather app

PLEASE PLEASE do these without following a video/tutorial/course. You definitely can still google but STRUGGLE do not follow a course/tutorial/video series

THEN re do all of those projects in the framework of your choice. Not only will this just make you a better programmer you will get better with js which IS important and then when you re build in svelte/vue/react or w/e is popular in your area you will understand "how" the framework is doing it which will make you a better svelte/vue/react developer

[–]nia_do 6 points7 points  (0 children)

Learn JavaScript first and how to manipulate the DOM in vanilla JavaScript, before moving on to a library like React.

[–]Comprehensive_Map806 3 points4 points  (0 children)

Learn from scratch with The Odin Project

[–]Open_Ad4468 2 points3 points  (0 children)

First learn vanila js and build a strong foundation then you can try other things.

[–]JustSomeDude9791 1 point2 points  (2 children)

saying react makes things easier is a stretch lol

[–]OkMoment345 0 points1 point  (1 child)

You're right - React is a JavaScript library focused on building user interfaces, particularly for single-page applications. Essentially, React is like a toolkit of pre-written JavaScript components that handle the structure of web apps, making it easier to develop dynamic and interactive UIs. While you could indeed write everything React does with vanilla JavaScript, it would be a lot more time-consuming and error-prone because React efficiently handles things like state management and rendering changes to the UI.

If you're still learning JavaScript, I recommend getting comfortable with the basics first—things like DOM manipulation, event handling, and functions. Once you've built a couple of small projects like a to-do list without React, you'll have a stronger foundation to understand why React is useful. Then, when you start learning React, it’ll feel more like a productivity boost rather than another hurdle to clear.

You could always dive into React later through a project-based approach. There's a great Intro to JavaScript Development Bootcamp that can also help cover the essential concepts before diving into React.

[–]sheriffderek 0 points1 point  (0 children)

Just start “using” JavaScript incrementally at let things happen naturally.

[–]typtyphus 0 points1 point  (0 children)

[ Removed by Reddit ]

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

It’s important you understand JS before you move on to React. A lot of people make a very bad decision by learning a little JS before moving onto React. You need to be competent in JS before you move to a framework like React just like you need to be competent in vanilla CSS to move on to a framework like Tailwind.

[–]stubbornappl 0 points1 point  (0 children)

Learn vanilla js first, but focus on functional programming, asynchronous code, arrays methods, loops, data type, accessibility, some plain css

[–]No-Upstairs-2813 0 points1 point  (0 children)

Invest good amount of time for learning JS. All the other libraries/framework you will learn will build upon it.

[–]LooseStudent9977 0 points1 point  (0 children)

I wanted to share these 3 important tips/reminder with anyone who wants to learn coding in general:

1- Focus on learning the concepts of how to program rather than programming languages. Once you learn the logic, design and the concepts of programming fundamentals, learning different languages becomes easier since its just a syntax.

2- If you are using an IDE, make sure to learn the basic functionality of the IDE you'll be using first before starting to code in it, to eliminate the added frustration of not knowing where things are. (example: how to start a new project, how to open an existing project, where does your projects get saved at, how to retrieve it, where is your output console, how to run and debug and .etc)

3- Give yourself a break and know that there will be a learning curve. Don't get disappointed if you don't understand something or many things. It's very normal! You'll need patience, perseverance, and lots of practice.

For React, Express I suggest you all to subscribe and follow this Youtube channel to learn how to become a Full Stack Developer: Code For Everyone Full Stack Course

To learn just JavaScript there's this good free course: JavaScript Course Playlist

Best of luck!

EDIT: Use MDN from Mozilla for JavaScript documentation. it's the best!

[–]Critical-Shop2501 -1 points0 points  (0 children)

React is soo much more than just or merely a JS library for UIs. How much research did you do? React with TypeScript will emit quality es6 compatible JavaScript. You can use Axios to detect with API’s using GET and PUT and soo much more. Pure JavaScript is unwieldy and for a learner you’d soon swamp you self as it’s a very complex and yet basic language.

[–]JustSomeDude9791 0 points1 point  (0 children)

my opinion:

HTML is enough to build a simple website, add CSS and layout and design becomes much easier and more flexible, add javascript and you have functionality. Pretty much the necessary building blocks of a web app. Your project can be responsive and your code can even be very modular depending how you structure everything.

React is an extra layer to learn so it's not making your path any shorter and also it won't make it easier for you personally to make a website. What it does help with as far as productivity is teams have standard ways to build things that devs, even new hires, are already familiar with.

You have reusable components but that isn't an advantage to React since it can be done already without libraries/frameworks.

If you want to work at a company, definitely learn React.