Prevent child from re-rendering in React using React.memo
This is the parent component import React,{useEffect, useState} from ‘react’; import ‘./style.css’; import Child1 from
Web Developer | Photography | Graphic Design | Digital artwork | Photo editing
This is the parent component import React,{useEffect, useState} from ‘react’; import ‘./style.css’; import Child1 from
function Student() { this.obj = {}; this.setName = function(name) { this.obj.name = name; return this;
The following code returns 1. It is tricky but should be eye opener. export default