![](/style/images/good.png)
![](/style/images/bad.png)
Any advice for someone who wants to start learning React.js?
source link: https://dev.to/jr01/any-advice-for-someone-who-wants-to-start-learning-reactjs-1omd
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Top comments (32)
Before learning React.js, make sure to have a solid understanding of following ES6+ features because these features are heavily used in React.
- let and const
- arrow functions
- object and array destructuring
- object shorthand syntax
- template literals
- rest and spread operator
- optional chaining
- promises
- import & export
- async/await
- array methods like find, filter, map, reduce etc
- primitive types and reference types.
You can check out the below articles to learn more about it:
You can also check out this course.
CollapseExpand
If you're planning to focus on web then spend time on HTML, CSS and DOM first. All the web standards.
Currently we have an overabundance of React-based apps that have weak usability, poor CSS architecture, and lots of re-invented wheels on features natively provided by the browser. All these factors result to unnecessary extra work which causes an endless cycle of write more JS to fix problems caused by using more JS.
React specifically often wants to solve problems "the React way" that are only relevant in the React mindset. This adds unnecessary complexity and causes problems you would never have if you know how things really work with the browser. This can give you an advantage in a job as you then know what NOT to solve with React.
CollapseExpand
If you want to learn React.js then you should have knowledge on JavaScript in details.
Like not the basics of JavaScript but the core difficult concepts of JavaScript
- variable and function Hoisting
- Scope Chain and Lexical Scoping 3.This key word 4.OOPS (classes, objects, inheritance, interface, polymorphism) 5.Higher order function 6.call back function. 7.IIFE(Immediately Invoked Function Expression) 8.call(), bind(), apply() 9.callback hell 10.ECMA6 11.Object De-Structuring 12.Spread and Rest operator
- async - await, fetch
- promises/ then /catch / finally
CollapseExpand
Consider having a good understanding of Javascript, DOM, and try to learn by building projects 👍.
- First you have can have a basic introduction to React for a al week or more.
- Following weeks you need to apply the basic knowledge(theoretical) and try build using any freeCodeCamp tutorials.
- As you know the basics already following along the tutorial won't be a big deal.
CollapseExpand
Make sure to have a project in mind.
React is just a means to an end (a website, blog, e-commerce website, etc.). This will keep you motivated and keeps learning practical.
Fullstackopen really helped me get started : fullstackopen.com/en/.
It's free and each lesson has you create a project and builds on top of each other.
CollapseExpand
I wrote an entire article with references to more reading and the most important parts and most common pain points
dev.to/adaptive-shield-matrix/reac...
CollapseExpand
Change of mindset is crucial. There are certainly technical requirements but there are many unresolved psyche about this field and unclear expectation is what constitutes to many people falling out.
It's a difficult field but the result (especially the pay) outweighs the difficult part.
There's this the boring beginner work of learning the basics that you have to do. There is no other way out. The more you delay it, the longer you'll make your journey and increase your risks.
There's this cumulative 12-15 hrs required where you have to write and see, write and see and write and see all the basic syntax. You have to indoctrinate yourself to see and identify "() => { //code here }" as arrow function and all similar syntax. Everything in react or any library or framework is just built using these basic structure. Literally indoctrinate yourself to be able to see and indentify and also write these basic syntax.
Some people spend year(s) to indoctrinate themselves this way. Some do this within 1 to 1.5 weeks or less. You can keep on delaying these cumulative first 12-15 hrs for as long as you want. It's only wise to do this as quickly as you can.
React is a library that helps you write UI and manage data in it. That's what react is at it's core. Usually, it comes with lots of tooling in different flavours and forms; npm, webpack, create-react-app, vite, etc. It's crucial to be able to see react separate from all of this tooling. It's not easy in beginning but you should strive for it.
Push your boundaries and revisit all concepts you learn to strengthen them and push your boundaries again. Do this alot.
Repetition is the key
CollapseExpand
Make sure you know JavaScript well first. I just made a post here explaining beginner mistakes and how to fix => dev.to/_ndeyefatoudiop/struggling-...
Before diving into the post about beginner mistakes and their fixes, ensure you have a strong understanding of JavaScript. Kingkind, mastering JavaScript fundamentals will greatly enhance your ability to comprehend and apply the suggested solutions.
CollapseExpand
make small things with it first, a calculator, a weather app stuff like that.
reference the documentation and use youtube videos to learn how to do things you want to do.
CollapseExpand
Master JavaScript and HTML, CSS, SASS. Learn from freecodecamp platform and Mozilla Doc
freecodecamp.org/learn
developer.mozilla.org/en-US/docs/L...
Then learn Reactjs and Typescript ( follow official documentation )
CollapseExpand
I would say start learning Svelte. It is easier, not overcomplicated and has better performances.
Thanks for suggestion, I might dive into that in nearest future
CollapseExpand
Make sure that you're not just learning the React syntax, but the core concepts that React provides (components, state, etc.) so that you can easily switch over to other tools like Svelte/Solid later.
I would also actually recommend starting out with Fresh/Preact instead, since the syntax is similar to React but it's much simpler and less buggy than Next.js/React.
Next.js and Fresh are bigger frameworks for building webapps with React./Preact.
CollapseExpandCollapseExpand
build more with mock api - you can use tools like Fakend
CollapseExpand
CollapseExpand
CollapseExpand
TBH - it's one of the least enjoyable UI libraries I've worked with, and doesn't really have very good performance. Try Vue, Svelte, or RiotJS - a very much nicer experience.
Just seeing JSX code makes me want to vomit! 🤮
Some comments may only be visible to logged-in visitors. Sign in to view all comments.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK