By using components as templates we can save our time developing a same UI or functionality multiple times. By placing the part of UI, which is similar for all the elements in one separate component and then enclosing all the…
Category: React Js
Horizontal and Vertical Scaling In React JS
Horizontal Scaling Horizontal scaling is also known as scaling out. Horizontal scaling refers to the process of adding more machines to handle the huge incoming traffic. Horizontal scaling helps in parallel processing. It is like if we want to finish…
React Js vs Angular Js
React Js : React Js is a Javascript library, used to create single page web applications. React uses JSX for writing its components. JSX stands for Javascript XML. In jsx we can write HTML and JS together. As React Js…
How to use usememo hook in React Js?
useMemo() is an another hook in react js, which is used for the optimization purposes. It is similar to useCallback() hook, but the difference is that the useCallback() hook memoizes the function definition, whereas the useMem() hook memoizes the value.…
How to useCallback() in React Js?
useCallback() is a hook in react js, which is used for the optimization purposes. As we know when the component re-renders all the functions defined inside it, will be created again. To avoid this we have a inbuilt hook, which…
Way to Implement Conditionals in React JS
Conditional expressions in react js are used to render the components or the elements of components according to the conditions. For example, if your cart is empty then show “Your cart is empty” else show the cart items. 1. Logical…
How to use CSS in React JS?
A plain react js website without any styling will not look attractive. For a beautiful looking website, we need to add styles in that and that we can do using CSS. In React Js we can add css using 3…
How to use React Router DOM in React Js?
React router is used to facilitate the routing inside the react application. React js doesn’t have inbuilt routing capabilities. So we use a npm package named react router dom. To install it, simply write the below given command in the…
What is Hooks in React JS?
Hooks in react js are functions, which let you to use state inside the functional components. Hooks are used to associate the state to the functional component. Before the hooks were introduced, if we wanted to use the states in…
What is Events React JS?
Events in react js are similar to HTML events. Events are any user action that handles any type of functionalities. For example, in windows 10, double clicking opens the application or a file. Events in react js are of many…