0

Any advice for someone who wants to start learning React.js?

 4 months ago
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.
Jr

Posted on Feb 4

sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg 12 multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg 3 exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg 1 raised-hands-74b2099fd66a39f2d7eed9305ee0f4553df0eb7b4f11b01b6b1b499973048fe5.svg 1 fire-f60e7a582391810302117f987b22a8ef04a2fe0df7e3258a5f49332df1cec71e.svg 1

Any advice for someone who wants to start learning React.js?

Top comments (32)

pic

CollapseExpand

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.

Comment button Reply

CollapseExpand

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.

Comment button Reply

CollapseExpandCollapseExpand

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

  1. variable and function Hoisting
  2. 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
  3. async - await, fetch
  4. promises/ then /catch / finally

Comment button Reply

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.

Comment button Reply

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.

Comment button Reply

CollapseExpand

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...

Comment button Reply

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.

  1. It's a difficult field but the result (especially the pay) outweighs the difficult part.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. Push your boundaries and revisit all concepts you learn to strengthen them and push your boundaries again. Do this alot.

  7. Repetition is the key

Comment button Reply

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-...

Comment button Reply

CollapseExpand

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.

Comment button Reply

CollapseExpand

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.

Comment button Reply

CollapseExpand

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 )

Comment button Reply

CollapseExpand

I would say start learning Svelte. It is easier, not overcomplicated and has better performances.

Comment button Reply

CollapseExpand

Thanks for suggestion, I might dive into that in nearest future

Comment button Reply

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.

Comment button Reply

CollapseExpand

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.

Comment button Reply

CollapseExpandCollapseExpand

build more with mock api - you can use tools like Fakend

Comment button Reply

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! 🤮

Comment button Reply

Some comments may only be visible to logged-in visitors. Sign in to view all comments.

Code of ConductReport abuse


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK