Category: ReactJS

December 22, 2022 / CodeMoments

Understanding the lifecycle of a react component is very crucial. It enables you to write code at a certain point in the process. There are basically four important lifecycle methods: componentDidMount, componentDidupdate, componentWillUnmount, shouldComponentUpdate. Let’s look at these methods in detail. ComponentDidMount componentDidMount is a method that is invoked when…

November 24, 2022 / ReactJS

ReactJS is a library that needs no introduction in the industry today. It is being used by small to large and even enterprise businesses to build intuitive user experiences. But, what led to React’s massive industry takeover? React first launched in 2012 didn’t gain much attention until late 2018 when…

November 3, 2022 / ReactJS

JSX is a syntax extension to Javascript but doesn’t it look like HTML? That’s the first question you will ask yourself when you see JSX code or any standard react template. It’s technically not HTML but to save you from the complexity you can say it is inspired by HTML.…

October 4, 2022 / ReactJS

Unit testing is an important part of the Software development life cycle and unit tests are written and executed by developers in which the smallest testable units of the code are tested to check whether the individual functionality is working as intended. The main aim of unit testing is to…

January 24, 2022 / CodeMoments

Event Propagation is simply the ways by which order an event is captured by browser in an HTML page where elements are nested. There are basically two types of event propagation bubbling and capturing. In event bubbling the event of the innermost element is captured first while in event capturing…

October 31, 2021 / ReactJS

Sometimes while exporting components and functions in react you might face an error “Object is not a function”. The clear meaning to this error is that something in your code that you are trying to use as a function is an object. When you face this error the first thing…