Javascript vs react

i have a question to frontend webdesign. i notice throughout the curriculum we never really dwelved into pure javascript with html and css, yet its an option in the codepen and many of the projects recommend pure javascript. I do understand there is javascript in react though. so my question is do react the new meta that replace the traditional javascript language in web design?

Hi @fredsmith27182 !

That’s probably because in a professional environment you would use some sort of framework or library instead of writing everything in vanilla javascript.

Can you show which FCC projects recommend vanilla js projects?
The front end section encourages you to use jquiry or react.

React, angular, ember, vue, jquiry…etc
It’s still just javascript at the end of the day.

These are all javascript libraries and frameworks that were created to speed up the development process.

Here is a good article talking about the benefits

React is super popular right now.
But who knows what will happen over the next 5, 10,15 years.

But in my opinion, there will always be javascript libraries and frameworks that will help with the development process instead of writing everything in vanilla js.

That’s my two cents. :grinning:

ok i figuire that is the case. just thought i ask to make sure.

oh my bad when i mentioned projects that recommend the vanilla JS, i was referring to third party beginner to intermediate level projects from outside outside of the FCC curriculum. thats where i look for projects to build. but even codepen has a vanilla javascript section.

oh ok cool.

Yeah that’s a popular choice for a lot of beginner tutorials.
It’s probably because they want to show beginners early on how javascript, html and css can work together in small projects.

The FCC curriculum focuses more on the underlying concepts and algorithms.

But it looks like the new curriculum expansion for javascript will teach vanilla js, with html and css.
https://github.com/freeCodeCamp/CurriculumExpansion/tree/master/basic-javascript-role-playing-game

yeah i thinkj the algorithm section was the most difficult of the curriculum so far. but i learned alot about coding struggling through it. my takeaway from it is sometimes u need to solve for z, to figure out how to solve for a.

So the JavaScript part of the course, the algorithms certificate, that teaches the language JavaScript. Everything else JS-related in the curriculum is an application of that. JS libraries are collections of code that you can use instead of writing that code yourself. But they are still just JS. Exactly the same rules apply.

“Pure JavaScript with HTML and CSS”: you are talking about the library that comes with browsers. It’s a collection of JS functions and objects that you can use for interaction on a web page. All (slight understatement!) it does is provide you with those to use, and again, they are just JS, same rules apply.

That there isn’t a section on this in the curriculum is a miss. But as was pointed out to me by one of the other mods, what is taught in the frontend libraries and frameworks certificate are the technologies used in the FCC applications. The FCC main learning site, for example, uses React, and it uses Redux (and I assume it used jQuery as well, though whether there is any jQuery code left at this point in time :man_shrugging:t3:). The server-side JS stuff taught by FCC, again, is stuff used in the FCC applications – Node, MongoDb. Mocha for testing. And so on.

React is just one library, built for handling UI in a specific way. It doesn’t replace anything, it’s just a set of tools that can be used to help build UI in a specific way

You’ll see different schools of thought on this. Some people believe very strongly that web developers should know how to do DOM manipulation without the use of any additional libraries. The arguments that I see for this tend to be either
a) There are many libraries, so learning one won’t be universal.
b) You shouldn’t use a library unless you know how it works under the covers.

For what it’s worth, I think that it’s fine to use a library from the get go. The only time I see direct DOM manipulation used is when people are just trying to quickly create a way to fiddle with or demonstrate something. Any real project is going to use one or more libraries. The argument that people just “should” learn it first feels really elitist and gatekeepy to me. If you’re not writing UI libraries, you don’t need to know the underlying mechanics just like you don’t need to be able to write a compiler in order to be a good C developer. It’s the type of thing that can give you some insights and a broader perspective, but it’s just not a necessary step.

All that said, if you’re interested in learning DOM manipulation without a framework or heavy library, then I encourage you to do that. I believe that this is one of the subjects that W3Schools actually has some decent material on. And there’s always MDN for more precise but less approachable information:

1 Like

thanks alot for thje response. i was just curious on the subject. im glad u brought up C++ to. i was wondering why C++ wasnt part of the currriculum as well. but im assuming it is dated and just isnt needed anymore. i was introduced to C++ in my college years. thats how old that language been around. and the native langujage to many of the newer languages like MATLAB.

I think that c++ is still needed in other areas of programming.

But freeCodeCamp has always been focused on getting people ready for web development jobs.
That is why the curriculum is heavily focused on html, css and javascript.

There are plenty of languages like java, C, C++, C#, etc that will probably never be covered in the main curriculum.

1 Like

C++ is definitely still a relevant language and freeCodeCamp has some C++ content on their YouTube channel. freeCodeCamp’s curriculum is focused on web development, where C++ is unlikely to be relevant. There are plans to expand the scope of freeCodeCamp’s curriculum over the course of several years, but it will be a natural progression from what is currently taught.

3 Likes

that’s really good to know. i think i will learn C++ on my own spare time when i get stuck with a FCC challenge.

Yeah, I agree that using a library is fine.

If you are a race car driver, do you need to know how to rebuild the engine? No, you have a mechanic for that. You focus on your driving skills. That being said… maybe a driver would be a slightly better driver if he knew a little about how the engine works? I wouldn’t want him to focus solely on that, but a little information about that might be good.

So, if you want, google “vanilla JS DOM manipulation”. But I wouldn’t spend a lot of time on it. I’m not sure how much it would help your growth as a web dev. If you’re using a library like React, it never really comes up as you have so much you can do with React - you can do just as much, a lot more easily. But if you’re curious and you have a weekend with nothing to do, why not?

that’s really good to know. i think i will learn C++ on my own spare time when i get stuck with a FCC challenge.

I agree with the previous statement that C++ isn’t that relevant to 99.99% of web development. (Ironically, I say this as I’m writing a sub module for mobile in C). But it is a great language and can teach you a lot. I question if it would be a good use of your time. It would be like a professional scuba diver taking flying lessons - it may be interesting but is it going to help his career?

But, you’re still trying to figure things out and want to keep your options open and you probably will learn some useful things along the way.

I don’t like the idea of “while I get stuck with a FCC challenge”. You will get stuck. I guarantee it. One of the best traits you can develop is to learn to push through and work the problem when you get stuck.

Instead, if you must do both, I would set aside a little time each day or every other day to work on a little C++. Learn to manage your time - another important skill for a developer.

2 Likes

I don’t like the idea of “while I get stuck with a FCC challenge”. You will get stuck.
thanks for the insight. yeah maybe thats a bad idea. I just found i am kinda stuck now on the react ands redux section. i was tempted to peak at the solutions but going to backtrack my previous react challenges and come back to it.

Instead, if you must do both, I would set aside a little time each day or every other day to work on a little C++. Learn to manage your time - another important skill for a developer.

thats a good idea. i might actually set a little time for C++. it was my first high level language in school. and i thjought you needed to know it for backend since its more coding intensive. I also dabbled a bit in assembly, but i had enough chasing binary hex code i dont miss that at all. i like that you can be able to assign values witghout figuring out which register or address you want to put it in.

oh and the only reawson i asked for the vanilla javascrtipt dom manipulation is becauise i thought u needed it for the project the beginner tutorial sites recommend. but i think ill use react since FCC uses it in it’s curriculum.

Yeah, those are difficult subjects at first, they are such a different way of thinking, and each different. But they work magic together. Don’t be afraid to check out a video or whatnot here or there to make sense of it. And the React docs are especially good.

and i thjought you needed to know it for backend since its more coding intensive

I don’t think of C++ as a backend language. Yes, you could use it, I’m sure there are libraries that will do it, it just isn’t one of the common ones. For those I would think Java, JavaScript (Node), Python/Django, Ruby/Rails, php, etc. You can do backends in C++, and I’m sure there are some people that love it, but I think you’d be swimming against the current.

I also dabbled a bit in assembly

Yeah, I hated it too. But it was useful information.

i asked for the vanilla javascrtipt dom manipulation is becauise i thought u needed it for the project the beginner tutorial sites recommend

Yeah, I’ve heard that advice before. That you should code a bunch of projects in vanilla because it shows that you learned that and that looks kinda cool. I don’t know, it never came up in any interview I did. There may be some jobs out there that require it, but really, an experienced developer, even if they’d never done vanilla before and just done React or whatever? I think it would take them a weekend to get good at it, so what is the big worry? I don’t know - I don’t think anyone ever asked me about it. Maybe others have a different experience.

yeah i wished the earlier curriculum emphasized more on the object oriented programming. i notice that is my main weakspot since react is kinda applied to that. connecting framework and objects together. i did learn alot from the algorithms section but i felt that is more a transition to the vanilla javascript style of web development. but both are a new way of thinking for me so its equally as difficult.

Right, when React first came out it was largely OOP, building classes as components. A lot of the newer React is actually building functional components, getting away from OOP. You still have to know the class based stuff, but I can’t remember the last class based component I wrote.

I think that understanding OOP is helpful for making the most of TypeScript. It’s still not class based inheritance, but it’s often syntactically wrapped to make sense for people with an OOP background.

You are right in saying React is the new, or current meta, while traditional javascript is barely used, well not only React, but several other frontend frameworks and FCC gives you the chance of jumping directly on a more contemporary wagon, without having to go thru the entire ladder, which is quite long, but ill strongly advise you, once you are done with FCC curriculum, to take your time and review vanilla javascript. There are good source of info and leaning tools for vanilla JS, especially not too complex example project guides, showcasing from A to Z how to build various stuff and this can greatly improve your coding skills and even your understanding and ability to work with the modern frameworks(after all they are all pure JS under the hood).

of course, thats why i take time off and hit codewars once in a while so i dont forget javascript. when i finish the curriculum. no idea when that will be but maybe a year or two. id love to review more vanilla java and dabble on some c++. i might want to go into software engineering and c++ will open the path for that. i like to have options. i was software engeineering at heart when i joined FCC but i gotten attachedto web development along the ways. since this free i say it doesnt hurt to learn web development even if its not something u wind up doing. coding is coding and it doesnt hurt to have a solid knowledge of both.