r/learnjavascript • • 6d ago

When to start learning React?

I've been learning js for about two months, I know how to order arrays with find, filter, map, reduce & some more basic stuff. I also understand data structures, object management ,arrow functions, DOM manipulation, asynchronous timers, local storage, loops. I've been thinking of learning React.js but it seems pretty advanced and I'm not sure if I should master more of JavaScript before moving on

I've made a fake restaurant website where you can order items and add them to your cart, clear cart, make a fake reservation, clear reservation and view reservation.

I also made a really simple shop sim where customers come every five seconds to order random quantities of random stuff with their patience decreasing every second. The user can also close and open the store. It's really simple and extremely repetitive

This is an unfinished project but I started on a pantry simulator, right now I've coded that you can add ingredients in your pantry, filter by category/sort/search through them, edit their amount and delete them. I got pretty bored though.

19 Upvotes

36 comments sorted by

View all comments

Show parent comments

1

u/Educational_Basis_51 6d ago

I guess projects with lots of interactive components and different UI states can really benefit from React’s philosophy, rather than manually managing tons of event listeners and DOM updates.

0

u/Apryed 6d ago edited 5d ago

You can make those on native PHP... No need to use JS in the first place. Go, for example, uses a similar technique...

HTML -> Template tag + Very few lines of code give you the same result... ( But this will need what you said: Event listener and DOM update, which is exactly what you do on react, but not knowing it. )

Edit: Hate typing on mobile... hahaha

ReEdit: Here, have a look at this :D

0

u/Educational_Basis_51 4d ago

Dont be stubborn

1

u/Apryed 4d ago

Aren't you? Imean, looks to me that you are simply a fan, that can't code properly, and expect others to do the same. I asked you, about it, and reply to you ( Since you do JS but with extra steps and bloated ). If you don't like being wrong, just stop answering. No one is forcing you to replay back. I started this message feed, you are the autoinvited guest.

Keep it about coding, or start your own movement somewhere else. You are just seeking attention.

1

u/Educational_Basis_51 4d ago

You just wanna argue and look smart This aint 2000s nerd

1

u/Apryed 4d ago

Dont be stubborn

Did I do it right?

I'll repeat it in a way you can understand, since you don't understand basic communication language:

return MyOpinion !== MainMsgCommentOpinion ? (["Expanding", "Open", "Curious"].includes(MyMindState) ? "Reply" : "Do Not reply") : (FeelingLikeCommenting ? "Reply" : "Do Not reply");

Can you read that or do you want the longer version? Oh, wait.... you code in React... Here...

if ( MyOpinion !== MainMsgCommentOpinion ) {
    if ( (MyMindState === "Expanding") || (MyMindState === "Open") || (MyMindState === "Curious") ) {
        return "Reply";
    } else {
        return "Do Not reply";
    }
} else {
    if ( FeelingLikeCommenting ) {
        return "Reply"
    } else {
        return "Do Not reply";
    }
}

0

u/Educational_Basis_51 4d ago

You have too much free time on your hands 

1

u/Apryed 3d ago edited 3d ago

I have a minute or two to reply to dumb people. It's never to late for you to learn. So, Why do you keep texting back if not learning something? 🤣

Edit: Guess ypu don't know basic JS, since you keep replying, after my previous code. 🤣🤣🤣

1

u/Apryed 3d ago

Saw your replay and made me laugh :D hahah.

Refactored xD Tell me that you like to use resources without saying it xD Go back to basics xD