Skip to content

Codeificant

  • DotNET
  • Javascript
  • MySQL
  • PHP
  • CSS
  • C++
  • News
  • Contact
CLOSE

Things to know about javascript before starting ReactJS

  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
  • Shares

There are few things to know about javascript before starting ReactJS. As we know doing a web development HTML and CSS are the two most important key factors. One should know basic of HTML and CSS before hitting ReactJS. Apart from HTML and CSS, in this article, I will tell you how much and what concepts of javascript you should learn first.

React JS is a library of JavaScript, So instead of shaking React JS, you should know at least some features of JavaScript. In this article, I will write mostly and frequently needed features of Javascript for React JS.

So without any further ado, let’s start. Let’s create a quick list with short descriptions of all you should practice if you are about to learn React JS.

1. Events

If you have ever written JS or Jquery, I am sure you have worked with the event. Most common events are click, change, submit, etc.. In React JS you will use these events more frequently. So I will suggest, you should learn more about events in Javascript first.

2. (regular and arrow) functions

Functions are one of the key features you will use quite frequently in React JS. So whenever you create an Event, most probably you will write a function for that event. In that function, you will write what should be done when this event triggers. Now we also write an arrow function on events which has its own advantages. So you should learn these two types of functions. Let’s see how these two look different by a simple example.

//Regular Function
function sayHello(){
  console.log('hello');
}

//Arrow function
const sayHello = () => console.log('hello'); // this will work if function has one line of code.

3. this keyword

If you are from an IT background, you must have used this keyword in any programming language. It has its own significance when you write a class component in React JS. Although if you know how this keyword works in javascript then you can skip this keyword and focus on next.

4. Arrays

In every programming language, you have heard of it. Array and Object are the two most important things when you will work with the database in React JS. Even though if you are a Frontend Developer you should know it. The array can increase the performance and reusability of your code. For this, I can show an example in React JS.

//Without an array
const a = 'one';
const b = 'two';
const c = 'three';
//lets display them in list
<ul>
  <li>{a}</li>
  <li>{b}</li>
  <li>{c}</li>
</ul>;

//With an Array
const arr = ['one', 'two', 'three'];
//lets display them in list
<ul>
  {arr.map(list => (
    <li>{list}</li>
  ))}
</ul>;

By the above example, you must have got my point of performance and reusability. I have used map function to loop through the arrays. There are a few array functions you should know about them. Let me list them for you below and if you like you can visit Useful JavaScript Array methods you should know – Part I.

  • map
  • filter
  • reduce
  • forEach

5. Objects

You would be shocked if I tell you Everything in Javascript is Object. Even arrays are object but arrays are special types of objects. In React JS most of the time you have to play with state and props, passing objects, receiving objects between components. So just make sure you know the basics of Objects like

  • Object destructing
  • Add data in the previous Object
  • Removing data from the object
  • Accessing objects with key

Few ES6 miscellaneous features

  • Template literals
  • Promises
  • Async and await
  • let and const
  • Scope

So that was all things to know about javascript before starting ReactJS. Hope this article helped you . If I have missed something please let me know in the comment box below.

Tags: angularjs reactjs, array javascript, codecademy reactjs, d3 reactjs, difference between java and javascript, download javascript, enable javascript chrome, facebook reactjs, JavaScript, javascript alert, javascript class, javascript console, javascript editor, javascript error, javascript filter, javascript if else, javascript indexof, javascript promise, javascript snake, javascript string contains, map javascript, node js vs reactjs, nodejs reactjs, react vs reactjs, reactjs and redux, reactjs basics, reactjs bind, reactjs blog, reactjs charts, reactjs class, reactjs component library, reactjs es6, reactjs ide, reactjs link, reactjs login, reactjs material design, reactjs mobile, reactjs native, reactjs nodejs, reactjs pdf, reactjs proptypes, reactjs resume, reactjs resume points, reactjs setstate, reactjs state, reactjs testing, reactjs tutorials, reactjs ui, reactjs vs, reduce javascript, splice javascript, typescript vs javascript, w3schools javascript, w3schools reactjs

Post navigation

How to scrap data using Node JS
How to install XAMPP on macOS to use PHP & MySQL

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

  • Best practices for viewing and querying Amazon SageMaker service quota usage
  • Remote monitoring of raw material supply chains for sustainability with Amazon SageMaker geospatial capabilities
  • How AWS Payments migrated from Redash to Amazon Redshift Query Editor v2
  • Build custom code libraries for your Amazon SageMaker Data Wrangler Flows using AWS Code Commit
  • Accelerating revenue growth with real-time analytics: Poshmark’s journey
  • AngularJS
  • C++
  • CSS
  • DotNET
  • Google
  • Java
  • Javascript
  • MySQL
  • News
  • NodeJS
  • PHP
  • Python
  • ReactJS
  • VueJS

Partners

Stackoverflow

Github

Bitbucket

Flatlogic

AWS Codecommit

Microsoft Visual Studio

Powered by Red Dragon Fly LLC - 300 E Esplanade Dr, Oxnard, CA 93036, USA
  • Facebook
  • Twitter
  • Google+
  • LinkedIn
  • Pinterest
  • StumbleUpon
  • Tumblr
  • Blogger
  • Myspace
  • Delicious
  • Yahoo Mail
  • Gmail
  • Newsvine
  • Digg
  • FriendFeed
  • Buffer
  • Reddit
  • VKontakte

Pin It on Pinterest