Skip to content

Instantly share code, notes, and snippets.

View anushka-beri's full-sized avatar

Anushka anushka-beri

View GitHub Profile
@anushka-beri
anushka-beri / React-Lifecycle-States.md
Last active November 18, 2021 07:27
Summary of React JS lifecycles and state management.

What is a SPA (single-page-application) ?

Read Here. Just the first 3 points are enough.

What is ReactJS ?

React.js is an open-source JavaScript library that is used for building user interfaces specifically for single-page applications. It’s used for handling the view layer for web apps. React also allows us to create reusable UI components. React allows developers to create large web applications that can change data, without reloading the page. The main purpose of React is to be fast, scalable, and simple. It works only on user interfaces in the application.

Why do we use it?

Array Methods

const collection = [1, 2, 3, 4, 5, 6, 7, 8];

const flowers = [
  {
    name: "Rose",
    price: 30,
  },

Call, Apply Methods

var pokemon = {
  firstName: "Pika",
  lastName: "Chu ",
  getPokeName: function () {
    var fullName = this.firstName + " " + this.lastName;
    return fullName;
  },
@anushka-beri
anushka-beri / FunctionalProgramming.md
Last active February 16, 2021 11:59
Gist based on explanation of Functional Programming.

Functional Programming in JavaScript