React Learning Order

RANVIR GORAI
Jul 27, 2017 · 3 min read

If you are a newbie in javascript and want to learn to react JS, react-native then you should have a good understanding of some basic concept of functional programming.

I am a full-stack developer, previously I worked on NodeJS, And AngularJS and all related framework, but when I moved to ReactJS and React Native, then I realize that it uses all core feather of functional programming.

So before moving to react or React-Native, you should know the following terms, which are involved directly or indirectly.

For the more detailed description please click here http://blog.ranvirgorai.com/react-learning-101/

  • Higher-Order function
  • JavaScript Array in Depth (Map)
  • Reduce data from JavaScript Array
  • Closure
  • Curring
  • Recursion
  • Callback
  • Promise
  • JavaScript ES6 and ES7 Syntax

Higher-Order function: This is one of the best feathers which well-suited javascript, for higher-order function, a higher order function is a function that can be assigned to any variable then later it can be executed from that variable, and a higher order function can take function as argument and it can also return a function as a result.

For example, Filter is a high order function that takes a function as an argument.

Map: It is also a high order function like filter, but unlike filter object in a usable form, map is used to iterate through all item which is present in array, and also return an item to a new array

For example :

let animals=[‘cat’,’dog’,’rat’,’elephant’];let newArray=animals.map((animal)=>animal)

Reduce: It is also a high order function, it is also received and iterate item like filter and map as the second argument and first as result value.

For Example

Closure: All function in javascript is a class because here we can access all outer variable inside a function. the closure is a combination of function and lexical scope.

For Example

Curring: Curring is a sequence of function which given final output at the end. Curring is achieved by bind function to next function. It takes the argument one by one and at the end return final result;

For Example

Recursion: Recursion is nothing but just a function call itself. This method helps to achieve looping feather without using a loop, and helps to reduce code size.

For Example :

Callback: It is a way to create an abstraction of any method, a callback is nothing but here we pass a function as an argument to a function, and that function is invoked inside the function.

For Example :

Calling Function

Promises: Promise is same as callback but having the ability to work in asynchronous, it is more powerful than the callback. A promise can be in three state

  • Pending: initial state, neither fulfilled nor rejected
  • Fulfilled: when action complete successfully
  • Rejected: when action failed

For Example :

For the more detailed description please click here http://blog.ranvirgorai.com/react-learning-101/

RANVIR GORAI

Written by

Trust Me I Am An Engineer

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade