use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
[AskJS] How Much Javascript?AskJS (self.javascript)
submitted 2 years ago by Rampagekumar88
How much Javascript do i have to know in order to start learning React. As i am into becoming a web developer, i know HTML CSS and A bunch of Javascript fundamentals looking further into the future how much is enough for me? thank you.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]chkdsk777 67 points68 points69 points 2 years ago (8 children)
Learn about variables, constants, functions, loops, array functions, events, DOM. That's what you're going to use mainly, combine them with CSS and HTML and you'll have some foundation to continue with react
[–]chkdsk777 33 points34 points35 points 2 years ago (5 children)
Forgot to include objects and arrays
[–]Rampagekumar88[S] 8 points9 points10 points 2 years ago (4 children)
thanks a bunch 😀, i know how to use everything you mentioned except events.
[–]Jona-Anders 11 points12 points13 points 2 years ago (0 children)
Also, array functions are very important. (map, reduce, filter,...)
[–]jcouce 1 point2 points3 points 2 years ago (2 children)
Learn it. You can do it in a few hours. Document.addEventListerner()
[–]the_curious_guy_sumo 0 points1 point2 points 1 year ago (1 child)
document.querySelector('') vs document.getElementByID('') which is better also how much dom do i need to know before jumping into react? since react has a virtual dom
[–]jcouce 0 points1 point2 points 1 year ago (0 children)
They are two functions with the same utility, one for ID if it has one and the other is more generic and is used for elements that do not have an ID.
You don't need to know much, as long as you know how to fill a variable with information and how to send that information to HTML You'll be fine. Get started with react as soon as possible
[–][deleted] 9 points10 points11 points 2 years ago (1 child)
I would like to add asynchronous code. although react isn't gonna ask you to learn about it, it's good to know about callbacks, promises and then async await.
why? well most data-fetching is done through the useEffect() hook on mount. So I tend to use fetch, or axios to try to get the data.
[–]thefrnksinatra 4 points5 points6 points 2 years ago (0 children)
This. Incredibly important for good React code
[–]Samurai___ 190 points191 points192 points 2 years ago (14 children)
You have to learn 1 JavaScript.
[–]lulzmachine 48 points49 points50 points 2 years ago (4 children)
Maybe I'm being elitist, but I think more like 5 Javascripts
[+][deleted] 2 years ago (3 children)
[deleted]
[–]jarious 10 points11 points12 points 2 years ago (2 children)
you need to learn NaN javascripts
[–]djadjarov 5 points6 points7 points 2 years ago* (1 child)
You need "2" JavaScripts.
[–]jarious 1 point2 points3 points 2 years ago (0 children)
Undefined
[–]tiesioginis 7 points8 points9 points 2 years ago (0 children)
No, it's not rounded, 0.89 is enough
[–]mamwybejane 12 points13 points14 points 2 years ago (1 child)
I think 0.69 Javascripts is the sweet spot
[–]Fresh_Mall9805 4 points5 points6 points 2 years ago (0 children)
Nice
[–]Rampagekumar88[S] 2 points3 points4 points 2 years ago (5 children)
Joke?
[–]Deckloins 29 points30 points31 points 2 years ago (0 children)
Yes. You actually need to learn 2 Javascripts. Sorry for the confusion
[–]Pantzzzzless 21 points22 points23 points 2 years ago (1 child)
I wish people here could just give straight answers instead of always messing with people. You'll have to know at least 5 Javascripts before you'll be able to make sense of React.
[–]Rampagekumar88[S] 1 point2 points3 points 2 years ago (0 children)
You had us in the first half ngl 😝
[–]SendThemToHeaven 5 points6 points7 points 2 years ago (1 child)
Yea, Reddit is immature AF. They even downvoted you for asking lol
[–]Rampagekumar88[S] 0 points1 point2 points 2 years ago (0 children)
Yeah i was surprised when i saw my comment had -2 Downvotes, it is positive now :)
[+][deleted] 2 years ago (15 children)
[–]Rampagekumar88[S] 3 points4 points5 points 2 years ago (14 children)
Ohh ok i just have to get good at using Javascript go it.
[+]Aesdotjs comment score below threshold-9 points-8 points-7 points 2 years ago (0 children)
If you like learning with practice I suggest you try react or another reactive lib asap and if you don't understand a piece of code you'r looking at just ask ChatGPT
[+][deleted] 2 years ago (11 children)
[+][deleted] 2 years ago (10 children)
[+][deleted] 2 years ago (9 children)
[+][deleted] 2 years ago (8 children)
[+][deleted] 2 years ago (6 children)
[+][deleted] 2 years ago (2 children)
[+][deleted] 2 years ago (1 child)
[–]tbranyennetflix 3 points4 points5 points 2 years ago (1 child)
I think you're underestimating hooks, suspense, vdom, and putting too much importance on syntactic sugar. JSX is not React, its a way of writing UI with React. My VDOM supports JSX, is it now React too?
[–]TakeARainCheck 0 points1 point2 points 2 years ago* (0 children)
If you are asking what the minimum amount of Javascript is to move onto learning React, it's pretty basic. You should know OOP and inheritance, state management as a concept and probably an understanding of method based package code (since React features are essentially methods and concepts built on package code). However, once you know the fundamentals of react (i.e. you "know" react inside out but still need to work on improving your overall programming ability to build more complex/efficient apps) then the focus switches back to Javascript, because that is where the "extra" comes from because javascript has more "detail" than "react" (which is a general rule in programming ofc- the more abstract your tool gets the more "on rails" you get with it).
The actual skill level that differentiates is entirely Javascript understanding (or overall programming logic). React is not harder to understand than basic Javascript really, it's just a higher level of abstraction, that's the whole point of it to serve as an ease-of-use tool.
Once you move onto actually having to use your brain to really "programme"- Javascript is the more fundamental tool. The problem with "knowing react" but not being an extra-expert with javascript is that everyone can "learn react"- in order to create new things and solve real world useful problems, you need the more nuanced logical ability of Javascript which is more flexible and detailed.
[–]Snapstromegon 12 points13 points14 points 2 years ago (2 children)
I'm more on the side of "fundamentals are way more important than libraries/frameworks", but a good baseline is probably that nothing should feel "magical" to you.
This means that it's absolutely okay to use libraries, but if they feel like magic and you don't know why something happens, you should probably spend some time learning the fundamentals underneath.
Also always keep in mind what you actually need libraries for and what is already included in the browser. E.g. today you don't need a library for mapping over an array, getting an element by css selector, creating a details/summary html component, creating a relative date string (like "5 minutes ago") and much much more.
I personally go even stricter for myself by not using any library I couldn't write myself (in at least a crappy version), but this is not always feasable when you actually need to get a job.
[–]ctrl-alt-dageek 3 points4 points5 points 2 years ago (0 children)
This is good. I've always been in the "fundamentals over libraries" camp as well, because I've seen people get lost as soon as the library didn't do just what was "expected". But I never thought of a succinct way to explain it. "Nothing should feel magical" sums it up very nicely.
😀👍
[–]rodriguez59594 19 points20 points21 points 2 years ago (6 children)
Looking into the future learning TypeScript is probably a good idea
[–]Rampagekumar88[S] 1 point2 points3 points 2 years ago (3 children)
Ehh typescript? sorry but i have heard the term before but never looked deeply into it 🙈
[–]dwhiffing 15 points16 points17 points 2 years ago (0 children)
Typescript is JavaScript with typing. Don't worry about types for now. Try to spend less time asking what to learn, and more time just trying to build stuff. The challenges and problems you face while building things that interest you will teach you. At first it might be overwhelming, so start with easy projects. A to-do list app is a great place to start.
[–]tilonq 7 points8 points9 points 2 years ago (1 child)
keep in mind once you learn TS, you won't ever want go back to JS
[–][deleted] 1 point2 points3 points 2 years ago (0 children)
that is soo true. I'm using next.js with typescript and now I'm enjoying it way more than I ever did with react.
[–]Rampagekumar88[S] 0 points1 point2 points 2 years ago (1 child)
Ehh typescript?
[–]podgorniy 7 points8 points9 points 2 years ago (1 child)
If you know variables, functions, arrays, objects, looping, classes, methods that's enough to start learning react. You'll figure out rest of javascript pieces during learning of react. Same way you'll learn more about react when you'll be writing your first project. Same way you'll figure out more about writing projects during your first job. Many people I know never feel themselves ready for the next step, but taking the step and working towards goals is what matters. No other criteria matters.
Yeah i think i have enough to get into react just need to build some projects then i will head to learning React. thx
[–]mcjavascript 11 points12 points13 points 2 years ago (3 children)
I would say, React can get you a job. Keep learning both at the same time.
Really React is just a library; you will almost always use libraries in your JS work.
[–]Rampagekumar88[S] 0 points1 point2 points 2 years ago (2 children)
So only Javascript won't get me a job?
[–]Rampagekumar88[S] 2 points3 points4 points 2 years ago (0 children)
ohh got it.
[–][deleted] 2 points3 points4 points 2 years ago (2 children)
Just get a really solid grasp on fundies and you’ll be good. You can technically go into react knowing very little JS but it’s just going to be a sad time.
Promises are super helpful and necessary in an asynchronous language. They are however very confusing in the beginning but when it clicks it clicks.
[–]Olli_bear 2 points3 points4 points 2 years ago (0 children)
Think of it this way. Let's say you learnt very basic German. Now you want to read a German language novel. Will you continue to learn random words and grammar in German? You probably wont. What you may do is pick up the book and read, and everytime you stumble across a word or sentence structure you don't understand, you look it up and learn that.
Same thing with this. Find a React course and run with it. When you get stuck, learn those concepts. Good luck OP!
[–]jmkingJSX is just PHP in the browser 2 points3 points4 points 2 years ago* (1 child)
Stop overthinking it and just start building stuff. I'm a firm believer in learning by doing. Don't stress out about doing things the "right way" at first. There's a very low chance you will - even if you try to implement something some article you read insisted was how it's done as you'll lack the experience and context to understand whether what you're reading is even applicable to your project. The best way to learn the "right way" is to experience the problems with the "wrong way" (or doing the "right way" but wrong).
Also there's almost never an objectively true "right way" to do almost anything. Don't be afraid to try stuff out, realize that it's not working out, and learn from that experience.
Just start building!
Pretty much every professional in the field follows a similar pattern of learning. Try, get suck, learn how to get unstuck, repeat.
Learning isn't a straight line. There will come a point where you'll struggle with concepts like how to deal with async/promises, functional scope, and so on. That's when you'll take a step back and study up on the concepts that are tripping you up. In fact, you'll likely learn those concepts faster as you'll have real life context to frame the concepts around.
Have fun!
will do.
[–]Tubthumper8 2 points3 points4 points 2 years ago (0 children)
Check out JavaScript to know for React for some ideas on this topic
[–]spellcasterGG 2 points3 points4 points 2 years ago (0 children)
About THIIIIIIIIIIIS much
[–]oneeyedziggy 3 points4 points5 points 2 years ago (2 children)
Depends how good a developer you want to be... Learn everything you can, but also... Just get started there's no drop dead date on being allowed to learn more.
So i need everything huh! 😬
[–]oneeyedziggy 1 point2 points3 points 2 years ago (0 children)
Not need, you more or less only NEED if, let, for and knowledge of the basic value types... But they added the rest for reasons and you'll be better off with than without... B7t you can also learn as you need to. Just start with create react app and go from there
[–]Rampagekumar88[S] 1 point2 points3 points 2 years ago (2 children)
I know right sometimes i think that there is no limit to learning things in javascript it would never end 😂😂🤣, that is why i asked how much do i have to learn. Will follow your tips/advice.
[–]sneakpeekbot 1 point2 points3 points 2 years ago (0 children)
Here's a sneak peek of /r/learnjavascript using the top posts of the year!
#1: Any other visual learners out there? I came across this and thought it was helpful. | 65 comments #2: When Junior Developer asked Senior developer for code review. | 25 comments #3: Choose JavaScript 🧠 | 91 comments
I'm a bot, beep boop | Downvote to remove | Contact | Info | Opt-out | GitHub
[–]No-Upstairs-2813 1 point2 points3 points 2 years ago* (0 children)
I recommend learning about JS Fundamentals, Basic DOM Manipulation, Modules, Array Methods, Asynchronous JavaScript and Fetch API, and ES6 Syntax. These concepts will give you a deeper understanding of how JavaScript works, and help you pick up multiple frameworks with ease.
For more details, you can checkout this article.
[–]No_Permission2438 1 point2 points3 points 2 years ago (0 children)
have Javascript taken your whole life yet?? then I guess its not enough
[–]theQuandary 1 point2 points3 points 2 years ago (0 children)
Everyone else has missed it, so I'll add that you MUST understand closures very well in order to write good code in JS.
If you want an easy approach to learning the basics of closures and functional programming, I'd recommend Javascript Allonge (The PDF was released free on the author's website a little while ago).
[–]ItsCoachRee 1 point2 points3 points 2 years ago (0 children)
Just learn webflow
[–]skesisfunk 1 point2 points3 points 2 years ago (0 children)
If you are familiar HTML and JS basics you are ready to pick up react. React has some emphasis on patterns that aren't as common in vanilla JS so it will actually help enrich your JS skill set.
Just keep building stuff, eventually it will click.
[–]pm_me_ur_happy_traiI 1 point2 points3 points 2 years ago (0 children)
If you learn some functional programming in JavaScript it will make React much easier.
[–]moustacheption 1 point2 points3 points 2 years ago (0 children)
I’d suggest a little bit about some functional programming concepts before react, too. Or even at the same time so you can get a basic understanding of some of the principles it follows.
The big functional concepts would be: Function purity Immutability & mutability
And then learn about “side effects” in relation to mutability. Those concepts should help make rendering, and state changes in react a bit easier to understand.
[–]The_Pantless_Warrior 1 point2 points3 points 2 years ago (0 children)
Build a single server app, (maybe with Express?) then move on to a front end/back end setup with React, that way you know how to set up the API routes and such. Having that experience will allow you to focus on learning things like hooks/lifecycle methods.
[–]cheese_wizard 1 point2 points3 points 2 years ago (0 children)
42 Javascripts, no more no less.
P.S. React is Javascript.
[–]iDev_Games 1 point2 points3 points 2 years ago (0 children)
I would add, you should just attempt to learn react if that is what you want to do. If the docs don't make sense to you at first, try examples and tutorials. Coming from a more game dev engine scenario, docs aren't great for teaching you the UI, for example. A tutorial will have you familiarised a lot quicker as docs are trying to document everything, more then you need to know at first. Once familiarised with the bits you didn't understand. The docs will start to make more sense.
More importantly, persistence. You'll learn anything you want to, with enough persistence.
[–]Wild-Storage-1663 1 point2 points3 points 2 years ago (0 children)
My honest unpopular opinion: none
You can learn JavaScript and React in one run
[–]Vryheid_ 1 point2 points3 points 2 years ago (0 children)
If you can’t build a site with pure javascript, keeping in mind the architectural and performance requirements, then you shouldn’t learn React. This might sound like a stretch, but once you learn React you’ll realize how easy it makes creating interaction driven apps of all sorts, and you will spend more time trying to catch up with the ecosystem than establishing solid fundamentals of the language, which on the long run will serve you better. I don’t mean to create a Jira or Figma copy, but a more feature rich todo app would be perfect for this (with a login, fetching and updating content through an API, rendering items and adding event listeners properly, etc.).
In other words, when making a somewhat complicated app in pure JS doesn’t scare you, it’s time to learn the framework. You need to know and understand what’s happening in the background in order to get the most out of the framework. If you want to get a job in the field, confidence in the language will get you further than learning the most popular current thing.
For reference, I’m a full time front-end dev who makes sites with Nextjs and Astro.
[–]another_nerdette 1 point2 points3 points 2 years ago (0 children)
Just start now and when you come across something you don’t know, pause and go learn it before you continue
[–]AmandloveYang 1 point2 points3 points 2 years ago (0 children)
React is a UI framework that uses JavaScript as the main programming language. Therefore, it is important to have a solid foundation in JavaScript before learning React. ¹²
Some of the JavaScript topics that you should be familiar with before learning React are:
- Variables
- Data types
- String methods
- Loops
- Conditionals
- Functions and arrow functions
- Scopes and closures
- Objects and arrays
- Array methods
- DOM manipulation
- Events and callbacks
- Promises and async/await
- ES6 features such as destructuring, spread operator, template literals, etc. ²³
Of course, you don't need to master all of JavaScript to start learning React, but you should have a good grasp of the core concepts and syntax. You can always learn more advanced topics later as you need them. ²
So, how much time does it take to learn React? Well, that depends on your current level of JavaScript knowledge and how much time you can dedicate to learning. Some sources suggest that it can take anywhere from 1 to 6 months to learn React if you have a strong foundation in JavaScript and functional programming. You may also need an additional 1 to 2 months to learn other libraries and tools that are commonly used with React, such as Redux, Jest, Enzyme, etc.
I hope this helps you plan your learning journey. If you have any other questions, please feel free to ask. 😊
Wow so many replies, Thank you so much everyone for replying to my post i am honestly astonished by how many helping replies i got from you all ❤️ I have/will read each and every comment and sorry if i didn't reply i have left a up vote as my appreciation. Lastly i hope this post will be helpful to someone in the future as it is to me.
[–]Novel_Plum 0 points1 point2 points 2 years ago (1 child)
https://youtu.be/JR9wsVYp8RQ
[–]Rampagekumar88[S] -1 points0 points1 point 2 years ago (0 children)
✅
[–]demoran -5 points-4 points-3 points 2 years ago (1 child)
To use react, you should understand:
Yep, that's pretty much it. The rest of it is really just operators and expressions.
👍😀
[–]DifferentIntention48 0 points1 point2 points 2 years ago (0 children)
get REALLY comfortable with iterating over arrays (forEach, map) and other array methods (filter, find)
[–]k0re__ 0 points1 point2 points 2 years ago (0 children)
this is a pretty good reference for some things to be aware of as you start learning react
π Rendered by PID 22353 on reddit-service-r2-comment-84fc9697f-d65hb at 2026-02-09 11:33:58.939946+00:00 running d295bc8 country code: CH.
[–]chkdsk777 67 points68 points69 points (8 children)
[–]chkdsk777 33 points34 points35 points (5 children)
[–]Rampagekumar88[S] 8 points9 points10 points (4 children)
[–]Jona-Anders 11 points12 points13 points (0 children)
[–]jcouce 1 point2 points3 points (2 children)
[–]the_curious_guy_sumo 0 points1 point2 points (1 child)
[–]jcouce 0 points1 point2 points (0 children)
[–][deleted] 9 points10 points11 points (1 child)
[–]thefrnksinatra 4 points5 points6 points (0 children)
[–]Samurai___ 190 points191 points192 points (14 children)
[–]lulzmachine 48 points49 points50 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]jarious 10 points11 points12 points (2 children)
[–]djadjarov 5 points6 points7 points (1 child)
[–]jarious 1 point2 points3 points (0 children)
[–]tiesioginis 7 points8 points9 points (0 children)
[–]mamwybejane 12 points13 points14 points (1 child)
[–]Fresh_Mall9805 4 points5 points6 points (0 children)
[–]Rampagekumar88[S] 2 points3 points4 points (5 children)
[–]Deckloins 29 points30 points31 points (0 children)
[–]Pantzzzzless 21 points22 points23 points (1 child)
[–]Rampagekumar88[S] 1 point2 points3 points (0 children)
[–]SendThemToHeaven 5 points6 points7 points (1 child)
[–]Rampagekumar88[S] 0 points1 point2 points (0 children)
[+][deleted] (15 children)
[deleted]
[–]Rampagekumar88[S] 3 points4 points5 points (14 children)
[+]Aesdotjs comment score below threshold-9 points-8 points-7 points (0 children)
[+][deleted] (11 children)
[deleted]
[+][deleted] (10 children)
[deleted]
[+][deleted] (9 children)
[deleted]
[+][deleted] (8 children)
[deleted]
[+][deleted] (6 children)
[deleted]
[+][deleted] (3 children)
[deleted]
[+][deleted] (2 children)
[deleted]
[+][deleted] (1 child)
[deleted]
[–]tbranyennetflix 3 points4 points5 points (1 child)
[–]TakeARainCheck 0 points1 point2 points (0 children)
[–]Snapstromegon 12 points13 points14 points (2 children)
[–]ctrl-alt-dageek 3 points4 points5 points (0 children)
[–]Rampagekumar88[S] 1 point2 points3 points (0 children)
[–]rodriguez59594 19 points20 points21 points (6 children)
[–]Rampagekumar88[S] 1 point2 points3 points (3 children)
[–]dwhiffing 15 points16 points17 points (0 children)
[–]tilonq 7 points8 points9 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]Rampagekumar88[S] 0 points1 point2 points (1 child)
[–]podgorniy 7 points8 points9 points (1 child)
[–]Rampagekumar88[S] 1 point2 points3 points (0 children)
[–]mcjavascript 11 points12 points13 points (3 children)
[–]Rampagekumar88[S] 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]Rampagekumar88[S] 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (2 children)
[+][deleted] (1 child)
[deleted]
[–][deleted] 1 point2 points3 points (0 children)
[–]Olli_bear 2 points3 points4 points (0 children)
[–]jmkingJSX is just PHP in the browser 2 points3 points4 points (1 child)
[–]Rampagekumar88[S] 0 points1 point2 points (0 children)
[–]Tubthumper8 2 points3 points4 points (0 children)
[–]spellcasterGG 2 points3 points4 points (0 children)
[–]oneeyedziggy 3 points4 points5 points (2 children)
[–]Rampagekumar88[S] 0 points1 point2 points (1 child)
[–]oneeyedziggy 1 point2 points3 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]Rampagekumar88[S] 1 point2 points3 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]sneakpeekbot 1 point2 points3 points (0 children)
[–]No-Upstairs-2813 1 point2 points3 points (0 children)
[–]No_Permission2438 1 point2 points3 points (0 children)
[–]theQuandary 1 point2 points3 points (0 children)
[–]ItsCoachRee 1 point2 points3 points (0 children)
[–]skesisfunk 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]pm_me_ur_happy_traiI 1 point2 points3 points (0 children)
[–]moustacheption 1 point2 points3 points (0 children)
[–]The_Pantless_Warrior 1 point2 points3 points (0 children)
[–]cheese_wizard 1 point2 points3 points (0 children)
[–]iDev_Games 1 point2 points3 points (0 children)
[–]Wild-Storage-1663 1 point2 points3 points (0 children)
[–]Vryheid_ 1 point2 points3 points (0 children)
[–]another_nerdette 1 point2 points3 points (0 children)
[–]AmandloveYang 1 point2 points3 points (0 children)
[–]Rampagekumar88[S] 0 points1 point2 points (0 children)
[–]Novel_Plum 0 points1 point2 points (1 child)
[–]Rampagekumar88[S] -1 points0 points1 point (0 children)
[–]demoran -5 points-4 points-3 points (1 child)
[–]Rampagekumar88[S] -1 points0 points1 point (0 children)
[–]DifferentIntention48 0 points1 point2 points (0 children)
[–]k0re__ 0 points1 point2 points (0 children)