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…
Category: 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…
What is Props in React JS?
As we know, the components in react js are simple javascript functions, which returns the JSX code. We can pass parameters to these component functions, which are called props. Props stands for properties. Props are the actual parameters passed to…
What is JSX in React Js?
JSX stands for JavaScript XML. JSX helps us to write HTML code inside the JavaScript code. JSX was introduced with ES6. Any component that we will use in React JS will use JSX. Example :- You can or can’t use…