<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>React Js &#8211; MaXEster Technologies  | Technical Blog</title>
	<atom:link href="https://www.maxester.com/blog/category/react-js/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.maxester.com/blog</link>
	<description>Tutorials, Examples and Implementation code for Developers Help</description>
	<lastBuildDate>Mon, 17 Feb 2025 09:17:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.22</generator>
	<item>
		<title>Using Components as Templates in React JS</title>
		<link>https://www.maxester.com/blog/2025/02/17/using-components-as-templates-in-react-js/</link>
		<comments>https://www.maxester.com/blog/2025/02/17/using-components-as-templates-in-react-js/#respond</comments>
		<pubDate>Mon, 17 Feb 2025 09:17:46 +0000</pubDate>
		<dc:creator><![CDATA[Maxester]]></dc:creator>
				<category><![CDATA[React Js]]></category>

		<guid isPermaLink="false">https://www.maxester.com/blog/?p=1357</guid>
		<description><![CDATA[<p>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&#8230;</p>
<p><a href="https://www.maxester.com/blog/2025/02/17/using-components-as-templates-in-react-js/" class="btn-more">Read More<span class="arrow-more">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2025/02/17/using-components-as-templates-in-react-js/">Using Components as Templates in React JS</a> appeared first on <a rel="nofollow" href="https://www.maxester.com/blog">MaXEster Technologies  | Technical Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[
<p>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 components which will use the logic inside the opening and closing tag.</p>



<p>We can get the elements inside the opening and closing tag of a component using props.children property.</p>



<p></p>



<div class="wp-block-image"><figure class="aligncenter"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/t5.png" alt="" class="wp-image-1358" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/t5.png 388w, https://www.maxester.com/blog/wp-content/uploads/2023/12/t5-150x150.png 150w, https://www.maxester.com/blog/wp-content/uploads/2023/12/t5-298x300.png 298w" sizes="(max-width: 388px) 100vw, 388px" /></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/t6.png" alt="" class="wp-image-1359" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/t6.png 826w, https://www.maxester.com/blog/wp-content/uploads/2023/12/t6-300x158.png 300w, https://www.maxester.com/blog/wp-content/uploads/2023/12/t6-768x404.png 768w" sizes="(max-width: 826px) 100vw, 826px" /></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/t7.png" alt="" class="wp-image-1360" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/t7.png 821w, https://www.maxester.com/blog/wp-content/uploads/2023/12/t7-300x120.png 300w, https://www.maxester.com/blog/wp-content/uploads/2023/12/t7-768x307.png 768w" sizes="(max-width: 821px) 100vw, 821px" /></figure></div>



<p></p>



<div class="wp-block-image"><figure class="aligncenter"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/t2.png" alt="" class="wp-image-1364"/></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/t4.png" alt="" class="wp-image-1361"/></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/t3.png" alt="" class="wp-image-1362" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/t3.png 979w, https://www.maxester.com/blog/wp-content/uploads/2023/12/t3-300x45.png 300w, https://www.maxester.com/blog/wp-content/uploads/2023/12/t3-768x116.png 768w" sizes="(max-width: 979px) 100vw, 979px" /></figure></div>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/t1.png" alt="" class="wp-image-1363" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/t1.png 550w, https://www.maxester.com/blog/wp-content/uploads/2023/12/t1-300x98.png 300w" sizes="(max-width: 550px) 100vw, 550px" /></figure>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2025/02/17/using-components-as-templates-in-react-js/">Using Components as Templates in React JS</a> appeared first on <a rel="nofollow" href="https://www.maxester.com/blog">MaXEster Technologies  | Technical Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.maxester.com/blog/2025/02/17/using-components-as-templates-in-react-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Horizontal and Vertical Scaling In React JS</title>
		<link>https://www.maxester.com/blog/2025/01/08/horizontal-and-vertical-scaling-in-react-js/</link>
		<comments>https://www.maxester.com/blog/2025/01/08/horizontal-and-vertical-scaling-in-react-js/#respond</comments>
		<pubDate>Wed, 08 Jan 2025 09:42:43 +0000</pubDate>
		<dc:creator><![CDATA[Maxester]]></dc:creator>
				<category><![CDATA[React Js]]></category>

		<guid isPermaLink="false">https://www.maxester.com/blog/?p=1342</guid>
		<description><![CDATA[<p>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&#8230;</p>
<p><a href="https://www.maxester.com/blog/2025/01/08/horizontal-and-vertical-scaling-in-react-js/" class="btn-more">Read More<span class="arrow-more">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2025/01/08/horizontal-and-vertical-scaling-in-react-js/">Horizontal and Vertical Scaling In React JS</a> appeared first on <a rel="nofollow" href="https://www.maxester.com/blog">MaXEster Technologies  | Technical Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[
<h4>Horizontal Scaling</h4>



<ol><li>Horizontal scaling is also known as scaling out.</li><li>Horizontal scaling refers to the process of adding more machines to handle the huge incoming traffic.</li><li>Horizontal scaling helps in parallel processing.</li><li>It is like if we want to finish a work early, then we have to increase the manpower.</li></ol>



<h4>Vertical Scaling</h4>



<ol><li>Vertical scaling is also known as scaling up.</li><li>Vertical scaling means increasing the power of a machine in the form of RAM, Memory, Processort or Bandwidth.</li><li>Vertical scaling is used to perform resource intensive tasks.</li><li>Vertical scaling is like hiring a more skilled employee to complete the work.</li></ol>



<h4 style="text-align:left">Difference between Horizontal and Vertical Scaling</h4>



<table class="wp-block-table has-fixed-layout"><tbody><tr><td><strong>Horizontal Scaling</strong></td><td><strong>Vertical Scaling</strong></td></tr><tr><td>1. It is also known as scaling out.</td><td>1. It is also known as scaling up.</td></tr><tr><td>2. Here we add more machines to our resource pool.</td><td>1. Here we upgrade our old machine with more RAM, Powerful Processor etc.</td></tr><tr><td>3. No single point of failure.</td><td>3. Single point of failure.</td></tr><tr><td>4. It is more costlier to maintain a no. of resources.</td><td>4. It is cheaper than horizontal scaling, as here we only have to maintain a single system.<br></td></tr><tr><td>5. Difficult to implement.</td><td>5. Easier to implement.</td></tr></tbody></table>



<h2></h2>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2025/01/08/horizontal-and-vertical-scaling-in-react-js/">Horizontal and Vertical Scaling In React JS</a> appeared first on <a rel="nofollow" href="https://www.maxester.com/blog">MaXEster Technologies  | Technical Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.maxester.com/blog/2025/01/08/horizontal-and-vertical-scaling-in-react-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>React Js vs Angular Js</title>
		<link>https://www.maxester.com/blog/2024/02/27/react-js-vs-angular-js/</link>
		<comments>https://www.maxester.com/blog/2024/02/27/react-js-vs-angular-js/#respond</comments>
		<pubDate>Tue, 27 Feb 2024 08:10:13 +0000</pubDate>
		<dc:creator><![CDATA[Maxester]]></dc:creator>
				<category><![CDATA[Node Js]]></category>
		<category><![CDATA[React Js]]></category>

		<guid isPermaLink="false">https://www.maxester.com/blog/?p=1373</guid>
		<description><![CDATA[<p>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&#8230;</p>
<p><a href="https://www.maxester.com/blog/2024/02/27/react-js-vs-angular-js/" class="btn-more">Read More<span class="arrow-more">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2024/02/27/react-js-vs-angular-js/">React Js vs Angular Js</a> appeared first on <a rel="nofollow" href="https://www.maxester.com/blog">MaXEster Technologies  | Technical Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[
<h4>React Js :</h4>



<p>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.</p>



<p>As React Js is a library, so for various features like routing we have to install separate packages.</p>



<h4>Angular Js :</h4>



<p>Angular Js is a Javascript framework, which can also be used to make single page web applications. Angular is Js framework, which means it has more  inbuilt  features. Angular also uses the component based approach to create websites.</p>



<h4>Difference between React Js and Angular :</h4>



<table class="wp-block-table has-fixed-layout"><tbody><tr><td><strong>React Js</strong></td><td><strong>Angular Js</strong></td></tr><tr><td>1. It is managed by Facebook.</td><td>1. It is managed by Google.</td></tr><tr><td>2. It is a Js library, which means for more features we are dependent on external packages.</td><td>2. It is a Js framework and has most commonly used features are inbuilt like routing.</td></tr><tr><td>3. It uses Javascript and JSX.</td><td>3. It uses Typescript and Html.</td></tr><tr><td>4. Manipulates the virtual DOM.</td><td>4. Manipulates the real DOM.</td></tr><tr><td>5. Learning curve is easier.</td><td>5. Learning curve is steep.</td></tr><tr><td>6. Migrating between versions is easier.</td><td>6. There are complications in migrating to a newer version.</td></tr></tbody></table>



<p></p>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2024/02/27/react-js-vs-angular-js/">React Js vs Angular Js</a> appeared first on <a rel="nofollow" href="https://www.maxester.com/blog">MaXEster Technologies  | Technical Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.maxester.com/blog/2024/02/27/react-js-vs-angular-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use usememo hook in React Js?</title>
		<link>https://www.maxester.com/blog/2023/12/30/how-yo-use-usememo-hook-in-react-js/</link>
		<comments>https://www.maxester.com/blog/2023/12/30/how-yo-use-usememo-hook-in-react-js/#respond</comments>
		<pubDate>Sat, 30 Dec 2023 08:17:41 +0000</pubDate>
		<dc:creator><![CDATA[Mayank Jha]]></dc:creator>
				<category><![CDATA[React Js]]></category>

		<guid isPermaLink="false">https://www.maxester.com/blog/?p=1208</guid>
		<description><![CDATA[<p>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.&#8230;</p>
<p><a href="https://www.maxester.com/blog/2023/12/30/how-yo-use-usememo-hook-in-react-js/" class="btn-more">Read More<span class="arrow-more">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2023/12/30/how-yo-use-usememo-hook-in-react-js/">How to use usememo hook in React Js?</a> appeared first on <a rel="nofollow" href="https://www.maxester.com/blog">MaXEster Technologies  | Technical Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[
<p>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. For example, </p>



<p>Memoizing a value is like caching a value so that it doesn&#8217;t need to be recalculated.</p>



<p>Syntax: const value = useMemo(functionThatCalculatesTheValue, dependencies);</p>



<p>useMemo() executes the functionThatCalculatesTheValue, only if the dependencies array got changed.</p>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/memo.png" alt="" class="wp-image-1209" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/memo.png 713w, https://www.maxester.com/blog/wp-content/uploads/2023/12/memo-300x250.png 300w" sizes="(max-width: 713px) 100vw, 713px" /></figure>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2023/12/30/how-yo-use-usememo-hook-in-react-js/">How to use usememo hook in React Js?</a> appeared first on <a rel="nofollow" href="https://www.maxester.com/blog">MaXEster Technologies  | Technical Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.maxester.com/blog/2023/12/30/how-yo-use-usememo-hook-in-react-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to useCallback() in React Js?</title>
		<link>https://www.maxester.com/blog/2023/12/25/how-to-usecallback-in-react-js/</link>
		<comments>https://www.maxester.com/blog/2023/12/25/how-to-usecallback-in-react-js/#respond</comments>
		<pubDate>Mon, 25 Dec 2023 08:56:36 +0000</pubDate>
		<dc:creator><![CDATA[Mayank Jha]]></dc:creator>
				<category><![CDATA[React Js]]></category>

		<guid isPermaLink="false">https://www.maxester.com/blog/?p=1205</guid>
		<description><![CDATA[<p>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&#8230;</p>
<p><a href="https://www.maxester.com/blog/2023/12/25/how-to-usecallback-in-react-js/" class="btn-more">Read More<span class="arrow-more">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2023/12/25/how-to-usecallback-in-react-js/">How to useCallback() in React Js?</a> appeared first on <a rel="nofollow" href="https://www.maxester.com/blog">MaXEster Technologies  | Technical Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[
<p>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 is useCallback(). It will take two arguments, first is the function and the second is the dependencies array. It basically cache the function definition between different re-renders. In simple words, it will not create the function again and again.<strong>:</strong></p>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/callback.png" alt="" class="wp-image-1206" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/callback.png 686w, https://www.maxester.com/blog/wp-content/uploads/2023/12/callback-300x245.png 300w" sizes="(max-width: 686px) 100vw, 686px" /></figure>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2023/12/25/how-to-usecallback-in-react-js/">How to useCallback() in React Js?</a> appeared first on <a rel="nofollow" href="https://www.maxester.com/blog">MaXEster Technologies  | Technical Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.maxester.com/blog/2023/12/25/how-to-usecallback-in-react-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Way to Implement Conditionals in React JS</title>
		<link>https://www.maxester.com/blog/2023/12/21/way-to-implement-conditionals-in-react-js/</link>
		<comments>https://www.maxester.com/blog/2023/12/21/way-to-implement-conditionals-in-react-js/#respond</comments>
		<pubDate>Thu, 21 Dec 2023 09:13:32 +0000</pubDate>
		<dc:creator><![CDATA[Mayank Jha]]></dc:creator>
				<category><![CDATA[React Js]]></category>

		<guid isPermaLink="false">https://www.maxester.com/blog/?p=1198</guid>
		<description><![CDATA[<p>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 &#8220;Your cart is empty&#8221; else show the cart items. 1. Logical&#8230;</p>
<p><a href="https://www.maxester.com/blog/2023/12/21/way-to-implement-conditionals-in-react-js/" class="btn-more">Read More<span class="arrow-more">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2023/12/21/way-to-implement-conditionals-in-react-js/">Way to Implement Conditionals in React JS</a> appeared first on <a rel="nofollow" href="https://www.maxester.com/blog">MaXEster Technologies  | Technical Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[
<p>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 &#8220;Your cart is empty&#8221; else show the cart items.</p>



<h4>1. Logical AND Operator :</h4>



<p style="text-align:left">Logical AND operator is used to render the components according to a condition. The first statement is condition then &amp;&amp; (AND Operator) and then the components or element. Note that inside javascript, we use &amp;&amp; for writing conditions inside the if-else statement, there it evaluates both the expression and it the condition satisfies then it executes the block, but in React JS, inside return statement where we write JSX, it evaluates the first condition and renders the second statement, which is a component or element.</p>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/and.png" alt="" class="wp-image-1200" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/and.png 626w, https://www.maxester.com/blog/wp-content/uploads/2023/12/and-300x146.png 300w" sizes="(max-width: 626px) 100vw, 626px" /></figure>



<h4>2. Ternary Operator :</h4>



<p>We can say that it is a short form of the if-else statement, which can be written in one line.</p>



<p>Syntax : condition ? expression1 : expression2</p>



<p>If the condition is true then execute expression1, else expression2</p>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/andif-1.png" alt="" class="wp-image-1201" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/andif-1.png 888w, https://www.maxester.com/blog/wp-content/uploads/2023/12/andif-1-300x94.png 300w, https://www.maxester.com/blog/wp-content/uploads/2023/12/andif-1-768x240.png 768w" sizes="(max-width: 888px) 100vw, 888px" /></figure>



<h4>3. if Statement :</h4>



<p>It is a simple if statement, which can be paired with else or a bunch of else-if statements.</p>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/if.png" alt="" class="wp-image-1202" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/if.png 622w, https://www.maxester.com/blog/wp-content/uploads/2023/12/if-300x123.png 300w" sizes="(max-width: 622px) 100vw, 622px" /></figure>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/ifop.png" alt="" class="wp-image-1203" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/ifop.png 399w, https://www.maxester.com/blog/wp-content/uploads/2023/12/ifop-300x69.png 300w" sizes="(max-width: 399px) 100vw, 399px" /><figcaption>Output will be same using all the 3 ways.</figcaption></figure>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2023/12/21/way-to-implement-conditionals-in-react-js/">Way to Implement Conditionals in React JS</a> appeared first on <a rel="nofollow" href="https://www.maxester.com/blog">MaXEster Technologies  | Technical Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.maxester.com/blog/2023/12/21/way-to-implement-conditionals-in-react-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use CSS in React JS?</title>
		<link>https://www.maxester.com/blog/2023/12/20/how-to-use-css-in-react-js/</link>
		<comments>https://www.maxester.com/blog/2023/12/20/how-to-use-css-in-react-js/#respond</comments>
		<pubDate>Wed, 20 Dec 2023 11:04:04 +0000</pubDate>
		<dc:creator><![CDATA[Mayank Jha]]></dc:creator>
				<category><![CDATA[React Js]]></category>

		<guid isPermaLink="false">https://www.maxester.com/blog/?p=1192</guid>
		<description><![CDATA[<p>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&#8230;</p>
<p><a href="https://www.maxester.com/blog/2023/12/20/how-to-use-css-in-react-js/" class="btn-more">Read More<span class="arrow-more">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2023/12/20/how-to-use-css-in-react-js/">How to use CSS in React JS?</a> appeared first on <a rel="nofollow" href="https://www.maxester.com/blog">MaXEster Technologies  | Technical Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[
<p>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.</p>



<p>In React Js we can add css using 3 ways.</p>



<ol><li>Inline CSS</li><li>A regular CSS File</li><li>Using Modules</li></ol>



<h3>Regular CSS File</h3>



<p>For adding regular css to our file, we have to import the css file using import keyword. Then we can use the classes defined in the stylesheet in our application.</p>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/regular.png" alt="" class="wp-image-1195"/></figure>



<h3>Inline CSS</h3>



<p>Every element takes a style attribute, inside that we have to pass a object containing the style definitions.</p>



<p></p>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/inline-1.png" alt="" class="wp-image-1194" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/inline-1.png 714w, https://www.maxester.com/blog/wp-content/uploads/2023/12/inline-1-300x70.png 300w" sizes="(max-width: 714px) 100vw, 714px" /></figure>



<h3>Using Modules </h3>



<p>Modules are also a way to add CSS in react js files, it is useful as it removes the problem of global css conflicts. Here we have to import it using the import keyword, the css module file provides an object, where the classes are the keys and the style definition is their corresponding values.</p>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/module.png" alt="" class="wp-image-1196" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/module.png 497w, https://www.maxester.com/blog/wp-content/uploads/2023/12/module-300x130.png 300w" sizes="(max-width: 497px) 100vw, 497px" /></figure>



<p><strong>NOTE :</strong> All the css files will be written in the same way as the normal css files. Only while using modules for css, the css files will be saved using the filename.module.css</p>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2023/12/20/how-to-use-css-in-react-js/">How to use CSS in React JS?</a> appeared first on <a rel="nofollow" href="https://www.maxester.com/blog">MaXEster Technologies  | Technical Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.maxester.com/blog/2023/12/20/how-to-use-css-in-react-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use React Router DOM in React Js?</title>
		<link>https://www.maxester.com/blog/2023/12/19/how-to-use-react-router-dom-in-react-js/</link>
		<comments>https://www.maxester.com/blog/2023/12/19/how-to-use-react-router-dom-in-react-js/#respond</comments>
		<pubDate>Tue, 19 Dec 2023 10:13:23 +0000</pubDate>
		<dc:creator><![CDATA[Mayank Jha]]></dc:creator>
				<category><![CDATA[React Js]]></category>

		<guid isPermaLink="false">https://www.maxester.com/blog/?p=1189</guid>
		<description><![CDATA[<p>React router is used to facilitate the routing inside the react application. React js doesn&#8217;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&#8230;</p>
<p><a href="https://www.maxester.com/blog/2023/12/19/how-to-use-react-router-dom-in-react-js/" class="btn-more">Read More<span class="arrow-more">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2023/12/19/how-to-use-react-router-dom-in-react-js/">How to use React Router DOM in React Js?</a> appeared first on <a rel="nofollow" href="https://www.maxester.com/blog">MaXEster Technologies  | Technical Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[
<p>React router is used to facilitate the routing inside the react application. React js doesn&#8217;t have inbuilt routing capabilities. So we use a npm package named react router dom.</p>



<p>To install it, simply write the below given command in the terminal :</p>



<p style="text-align:center">npm i &#8211;save react-router-dom</p>



<p>To use the react router dom inside your project, you can refer the code provided below :</p>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/router.png" alt="" class="wp-image-1190" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/router.png 599w, https://www.maxester.com/blog/wp-content/uploads/2023/12/router-300x219.png 300w" sizes="(max-width: 599px) 100vw, 599px" /></figure>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/header_router.png" alt="" class="wp-image-1191" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/header_router.png 912w, https://www.maxester.com/blog/wp-content/uploads/2023/12/header_router-300x117.png 300w, https://www.maxester.com/blog/wp-content/uploads/2023/12/header_router-768x299.png 768w" sizes="(max-width: 912px) 100vw, 912px" /></figure>



<p></p>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2023/12/19/how-to-use-react-router-dom-in-react-js/">How to use React Router DOM in React Js?</a> appeared first on <a rel="nofollow" href="https://www.maxester.com/blog">MaXEster Technologies  | Technical Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.maxester.com/blog/2023/12/19/how-to-use-react-router-dom-in-react-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is Hooks in React JS?</title>
		<link>https://www.maxester.com/blog/2023/12/16/what-is-hooks-in-react-js/</link>
		<comments>https://www.maxester.com/blog/2023/12/16/what-is-hooks-in-react-js/#respond</comments>
		<pubDate>Sat, 16 Dec 2023 10:23:45 +0000</pubDate>
		<dc:creator><![CDATA[Mayank Jha]]></dc:creator>
				<category><![CDATA[React Js]]></category>
		<category><![CDATA[React Js Hooks]]></category>
		<category><![CDATA[useContext()]]></category>
		<category><![CDATA[useEffect()]]></category>
		<category><![CDATA[useReducer()]]></category>
		<category><![CDATA[useRef()]]></category>
		<category><![CDATA[useState()]]></category>

		<guid isPermaLink="false">https://www.maxester.com/blog/?p=1170</guid>
		<description><![CDATA[<p>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&#8230;</p>
<p><a href="https://www.maxester.com/blog/2023/12/16/what-is-hooks-in-react-js/" class="btn-more">Read More<span class="arrow-more">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2023/12/16/what-is-hooks-in-react-js/">What is Hooks in React JS?</a> appeared first on <a rel="nofollow" href="https://www.maxester.com/blog">MaXEster Technologies  | Technical Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[
<p>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.</p>



<p>Before the hooks were introduced, if we wanted to use the states in our components, then we had to convert it to the class based component. As we all know functional components are a lot easier to understand and write. Therefore, hooks came to take there game one level up.</p>



<p>There are many hooks available in react js like useState(), useEffect(), useMemo(), useReducer(), useContext() etc. We can also create are own hooks.</p>



<p>There are some conditions which we have to follow, if we want to use hooks in our components.</p>



<ol><li>Hooks must be used inside the react components, not in any regular javascript function.</li><li>Hooks must not be used inside the local blocks, loops.</li><li>Hooks must appear at the top of the component functions.</li></ol>



<h3>Hooks in React JS</h3>



<h4>1. useState() :</h4>



<p>useState() hook is used to track the state of the component. A state contains the data of a component at any particular instance of a time.</p>



<p>To use the useState() hook, First we have to import it.</p>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/import.png" alt="" class="wp-image-1171" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/import.png 322w, https://www.maxester.com/blog/wp-content/uploads/2023/12/import-300x28.png 300w" sizes="(max-width: 322px) 100vw, 322px" /></figure>



<p>The useState() hook takes initital state as a parameter and returns two values, i.e. current state and the function to update the state. We can&#8217;t update the state directly.</p>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/useState.png" alt="" class="wp-image-1172" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/useState.png 400w, https://www.maxester.com/blog/wp-content/uploads/2023/12/useState-300x31.png 300w" sizes="(max-width: 400px) 100vw, 400px" /></figure>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/program.png" alt="" class="wp-image-1174" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/program.png 857w, https://www.maxester.com/blog/wp-content/uploads/2023/12/program-300x216.png 300w, https://www.maxester.com/blog/wp-content/uploads/2023/12/program-768x553.png 768w" sizes="(max-width: 857px) 100vw, 857px" /></figure>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/web1-1.png" alt="" class="wp-image-1175" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/web1-1.png 538w, https://www.maxester.com/blog/wp-content/uploads/2023/12/web1-1-300x91.png 300w" sizes="(max-width: 538px) 100vw, 538px" /></figure>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/web2-1.png" alt="" class="wp-image-1176" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/web2-1.png 546w, https://www.maxester.com/blog/wp-content/uploads/2023/12/web2-1-300x88.png 300w" sizes="(max-width: 546px) 100vw, 546px" /></figure>



<h4>2. useEffect() :</h4>



<p>useEffect() is a hook used in react js to handle the side effects like fetching the data or updating the DOM, if a particular event occurs.</p>



<p>In order to use useEffect() hook, we first have to import it.</p>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/useEffect.png" alt="" class="wp-image-1177" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/useEffect.png 330w, https://www.maxester.com/blog/wp-content/uploads/2023/12/useEffect-300x24.png 300w" sizes="(max-width: 330px) 100vw, 330px" /></figure>



<p>useEffect() hook takes two values, one is the function to be executed and another is the dependency array. The dependency array contains the value upon whose updation the useEffect() hook will re render. If you want that the useEffect() hook should render only once then you can pass a empty array.</p>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/program2.png" alt="" class="wp-image-1178" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/program2.png 814w, https://www.maxester.com/blog/wp-content/uploads/2023/12/program2-300x182.png 300w, https://www.maxester.com/blog/wp-content/uploads/2023/12/program2-768x467.png 768w" sizes="(max-width: 814px) 100vw, 814px" /><figcaption>The useEffect() will execute on every button click</figcaption></figure>



<h3>3. useContext() :</h3>



<p>useContext() hook is used to manage the state of the whole application. It is used to pass the data in all the components without using the prop drilling. Whenever the components are nested deeply inside the component tree, at that time passing states using props become cumbersome. In that case the useContext() hook comes to rescue us.</p>



<p>We can create a context using the createContext() method.</p>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/context.png" alt="" class="wp-image-1179" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/context.png 830w, https://www.maxester.com/blog/wp-content/uploads/2023/12/context-300x44.png 300w, https://www.maxester.com/blog/wp-content/uploads/2023/12/context-768x112.png 768w" sizes="(max-width: 830px) 100vw, 830px" /></figure>



<p>To use context inside the components, we have to wrap the components inside the method provided by the react, which is &lt;context_name.Provider&gt;&lt;/context_name.Provider&gt;.</p>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/index.js_.png" alt="" class="wp-image-1182" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/index.js_.png 612w, https://www.maxester.com/blog/wp-content/uploads/2023/12/index.js_-300x95.png 300w" sizes="(max-width: 612px) 100vw, 612px" /></figure>



<p>Now for using the context values, we have to use the useContext() hook, which takes the context object which is returned by the createContext() method and it returns back the current value of that context.</p>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/useContext.png" alt="" class="wp-image-1180" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/useContext.png 736w, https://www.maxester.com/blog/wp-content/uploads/2023/12/useContext-300x228.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></figure>



<h4>4. useReducer() :</h4>



<p>useReducer() hook in react js is used to manage the state. Its purpose is similar to the useState() hook but it is preferred in complex applications where the state logic is complex and has different types of functions to perform the updation.</p>



<p>Syntax:</p>



<p>const [currentState, dispatchAction] = useReducer(reducerFunction, initialState,  init)</p>



<p>useReducer() takes 3 arguments reducerFunction which will be used to change the state, initial state of the application and a init function which is used to load the initial state lazily.</p>



<p></p>



<h3>5. useRef() :</h3>



<p>useRef() hook is used to persist a particular value between multiple renderings, For example , if we want to count how many times a particular component got rendered.</p>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/useRef.png" alt="" class="wp-image-1185" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/useRef.png 756w, https://www.maxester.com/blog/wp-content/uploads/2023/12/useRef-300x185.png 300w" sizes="(max-width: 756px) 100vw, 756px" /></figure>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/render1.png" alt="" class="wp-image-1186"/></figure>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/render2.png" alt="" class="wp-image-1187"/></figure>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2023/12/16/what-is-hooks-in-react-js/">What is Hooks in React JS?</a> appeared first on <a rel="nofollow" href="https://www.maxester.com/blog">MaXEster Technologies  | Technical Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.maxester.com/blog/2023/12/16/what-is-hooks-in-react-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is Events React JS?</title>
		<link>https://www.maxester.com/blog/2023/12/14/what-is-events-in-react-js/</link>
		<comments>https://www.maxester.com/blog/2023/12/14/what-is-events-in-react-js/#respond</comments>
		<pubDate>Thu, 14 Dec 2023 07:15:30 +0000</pubDate>
		<dc:creator><![CDATA[Mayank Jha]]></dc:creator>
				<category><![CDATA[React Js]]></category>
		<category><![CDATA[React JS Events]]></category>

		<guid isPermaLink="false">https://www.maxester.com/blog/?p=1163</guid>
		<description><![CDATA[<p>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&#8230;</p>
<p><a href="https://www.maxester.com/blog/2023/12/14/what-is-events-in-react-js/" class="btn-more">Read More<span class="arrow-more">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2023/12/14/what-is-events-in-react-js/">What is Events React JS?</a> appeared first on <a rel="nofollow" href="https://www.maxester.com/blog">MaXEster Technologies  | Technical Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[
<p>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.</p>



<p>Events in react js are of many types like mouseover, click, double click, drag, drop etc.</p>



<p>In react js we use camelCase representation to define any type of event. For example in HTML, we use onchange=&#8221;&#8221; but in react js we use it as onChange=&#8221;&#8221;.</p>



<p>Example :-</p>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/events.png" alt="" class="wp-image-1165" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/events.png 874w, https://www.maxester.com/blog/wp-content/uploads/2023/12/events-300x212.png 300w, https://www.maxester.com/blog/wp-content/uploads/2023/12/events-768x544.png 768w" sizes="(max-width: 874px) 100vw, 874px" /><figcaption>Events<br></figcaption></figure>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/web1.png" alt="" class="wp-image-1167" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/web1.png 538w, https://www.maxester.com/blog/wp-content/uploads/2023/12/web1-300x91.png 300w" sizes="(max-width: 538px) 100vw, 538px" /></figure>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/web2.png" alt="" class="wp-image-1168" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/web2.png 546w, https://www.maxester.com/blog/wp-content/uploads/2023/12/web2-300x88.png 300w" sizes="(max-width: 546px) 100vw, 546px" /></figure>



<p><strong>Note :</strong> We didn&#8217;t use the parenthesis in onClick={toggleColor} as we don&#8217;t want to execute it, we just passed the reference.</p>



<p>If we want to pass the arguments, if any event occurs then we have to use the arrow function.</p>



<p> onClick={ (val) =&gt; func(val) } </p>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2023/12/14/what-is-events-in-react-js/">What is Events React JS?</a> appeared first on <a rel="nofollow" href="https://www.maxester.com/blog">MaXEster Technologies  | Technical Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.maxester.com/blog/2023/12/14/what-is-events-in-react-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
