What is React Portal? React Portal provide the way to render children into a DOM node that exists outside the DOM hierarchy of the parent component.   Format ReactDOM.createPortal(child, container)   where the child is the Component which will be rendered at the place of the container which is dom node.   Implementation:   render() { […]

Read More →

What is code splitting in React js? Code Splitting in react js  simply spilt your bundle generated by Wepack or Browserify into multiple and load them dynamically.   Why splitting is important: We develop react app. Our code imports many third-party libraries. Bundle generated by web pack or Browserify also gets fatter and fatter.  This fat budle.js […]

Read More →

In the ReactJS, javascript error handling is not an easy job. There is not a consistent way to handle the error in ReactJs. Right now in React 15 or in the past the JavaScript errors inside the component corrupt the internal state and break the whole UI of the application, Means in React 15 or […]

Read More →

The fragment is a first-class component to wrap your child components and HTML elements instead of using any HTML element. Normal way of wrapping child component in render method render(){ return( <div> <Header/> <h1> Without Fragment </h1> </div> ); }   For above example, if you will not wrap the child component using <div> tag […]

Read More →

The  React v16.0 release was a big one and among the changes are fragments, error boundaries, portals, support for custom DOM attributes, improved server-side-rendering and reduced file size. We will talk about the Portals here. What is React Portal? A way of rendering a child component outside the present Dom-Node-Hierarchy as opposed to the traditional […]

Read More →

What is Immutable Data? Simply data that can not be changed is immutable. In the example below, we have data array which contains no of hours one employee worked on some specific project. var hoursWorked = [8, 8, 8, 7, 7, 9, 6, 8, 8, 7]; console.log(hoursWorked); //op: [8, 8, 8, 7, 7, 9, 6, 8, 8, 7] […]

Read More →

  What is Design Patterns? In simple words, design patterns are just a way of coding. There are several templates of coding and we name the group as design patterns and each pattern again have a specific name. There are 3 types of design patterns Creational Design Pattern Structural Design Pattern Behavioural Design Pattern   […]

Read More →

What is  Server Side Rendering? Server Side Rendering means rendering the initial view from server side later on everything will be done by the client side. In, this blog we will try to implement SSR in React js and does not include redux implementation as well. The advantage of SSR over CSR?   Improved Initial Rendering Time CSR:  Generally […]

Read More →

Mutable Data Structure:  Data object that can be changed Once we have created it is called as Mutable Data Structure. Example: Suppose we have a variable which has stored student names. var studentNames = [‘Akash’, ‘Prem’, ‘Suresh’, ‘Kiran’]; studentNames[2]; o/p: Suresh   Now, If Some developer wants to change Suresh to some another name say Shiva. […]

Read More →