<?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>Mayank Jha &#8211; MaXEster Technologies  | Technical Blog</title>
	<atom:link href="https://www.maxester.com/blog/author/mjhamaxester-com/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>HTTP Module in Node Js</title>
		<link>https://www.maxester.com/blog/2024/01/17/http-module-in-node-js/</link>
		<comments>https://www.maxester.com/blog/2024/01/17/http-module-in-node-js/#respond</comments>
		<pubDate>Wed, 17 Jan 2024 07:26:57 +0000</pubDate>
		<dc:creator><![CDATA[Mayank Jha]]></dc:creator>
				<category><![CDATA[Node Js]]></category>

		<guid isPermaLink="false">https://www.maxester.com/blog/?p=1232</guid>
		<description><![CDATA[<p>HTTP is a module in Node Js. It is installed on our system along with the installation of Node Js. It is basically used to work with HTTP protocol. We can create servers with HTTP and can make the server&#8230;</p>
<p><a href="https://www.maxester.com/blog/2024/01/17/http-module-in-node-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/01/17/http-module-in-node-js/">HTTP Module in Node 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>HTTP is a module in Node Js. It is installed on our system along with the installation of Node Js. It is basically used to work with HTTP protocol. We can create servers with HTTP and can make the server to listed on the port defined. HTTP module can handle almost all types of HTTP methods like get, post, delete, put, patch etc.</p>



<p>To use it in our projects, we first have to import it.</p>



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



<h4>Creating a server</h4>



<p>Using HTTP module we can create a server and make that server listen on the specified port. We can do this using the createServer() method of the HTTP module.</p>



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



<h4>Rendering HTML using HTTP module</h4>



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



<h4>Reading the url and sending the Header field</h4>



<p></p>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/url-1.png" alt="" class="wp-image-1237" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/url-1.png 513w, https://www.maxester.com/blog/wp-content/uploads/2023/12/url-1-300x232.png 300w" sizes="(max-width: 513px) 100vw, 513px" /></figure>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2024/01/17/http-module-in-node-js/">HTTP Module in Node 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/01/17/http-module-in-node-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modules in Node Js</title>
		<link>https://www.maxester.com/blog/2024/01/08/modules-in-node-js/</link>
		<comments>https://www.maxester.com/blog/2024/01/08/modules-in-node-js/#respond</comments>
		<pubDate>Mon, 08 Jan 2024 09:11:01 +0000</pubDate>
		<dc:creator><![CDATA[Mayank Jha]]></dc:creator>
				<category><![CDATA[Node Js]]></category>

		<guid isPermaLink="false">https://www.maxester.com/blog/?p=1226</guid>
		<description><![CDATA[<p>Modules in Node Js are collection of files containing various logic. Modules help to organize the code. The code can be used anywhere by using the modules, which results in the reusability of the code. Modules in Node Js are&#8230;</p>
<p><a href="https://www.maxester.com/blog/2024/01/08/modules-in-node-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/01/08/modules-in-node-js/">Modules in Node 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>Modules in Node Js are collection of files containing various logic. Modules help to organize the code. The code can be used anywhere by using the modules, which results in the reusability of the code.</p>



<p>Modules in Node Js are similar to the libraries in JS. Modules help to breakdown the complex logic into a collection of simple ones.</p>



<h3>Types of Modules</h3>



<p>Core/Inbuilt Modules : We don&#8217;t have to download these modules, they are installed along with the Node Js installation. We can use core modules by just importing them in our code. Some examples of the core modules are http, fs, os, path etc.</p>



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



<p></p>



<p>Third Party Modules : These modules are not included with the Node Js. We have to download them in our project. Most of the packages we use are available on npm. NPM stands for Node Package Manager, npm is a code repository, where you can find almost all types of modules.</p>



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



<p>Local Modules : Local modules are created by ourselves according to the need and can be used at the place where it is required.</p>



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



<p></p>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/m.png" alt="" class="wp-image-1230" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/m.png 434w, https://www.maxester.com/blog/wp-content/uploads/2023/12/m-300x104.png 300w" sizes="(max-width: 434px) 100vw, 434px" /><figcaption>Using the module</figcaption></figure>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2024/01/08/modules-in-node-js/">Modules in Node 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/01/08/modules-in-node-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is Node Js?</title>
		<link>https://www.maxester.com/blog/2024/01/03/wha-is-node-js/</link>
		<comments>https://www.maxester.com/blog/2024/01/03/wha-is-node-js/#respond</comments>
		<pubDate>Wed, 03 Jan 2024 08:51:24 +0000</pubDate>
		<dc:creator><![CDATA[Mayank Jha]]></dc:creator>
				<category><![CDATA[Node Js]]></category>

		<guid isPermaLink="false">https://www.maxester.com/blog/?p=1221</guid>
		<description><![CDATA[<p>Node Js is a Javascript runtime environment, which is used to create servers. In simple words it is used to JS outside the web browser. It is built with the help of Google Chrome&#8217;s V8 engine. Node Js is used&#8230;</p>
<p><a href="https://www.maxester.com/blog/2024/01/03/wha-is-node-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/01/03/wha-is-node-js/">What is Node 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>Node Js is a Javascript runtime environment, which is used to create servers. In simple words it is used to JS outside the web browser. It is built with the help of Google Chrome&#8217;s V8 engine.</p>



<p>Node Js is used to create data-intensive web applications or APIs as it uses the asynchronous methodology.</p>



<h3>Why should we use Node JS?</h3>



<ol><li>First of all, Node Js is based on JS, so you will definitely use JS for the frontend of your web applications. Using Node Js on the backend will help you to use the same JS on the backend as well (with some changes), so you don&#8217;t have to learn a different language for the backend.</li><li>Node JS can easily handle the basic CRUD (Create Read Update Delete) operations on the web apps.</li><li>We can send back dynamic content to the client and can also handle form submissions.</li><li>Node Js supports all the HTTP methods like get, post, put, patch, delete and the list goes on.</li><li>Using Node Js, you can also implement the authentication  and authorization on your web apps.</li><li>As Node Js is based on asynchronous methodology, its asynchronous nature eventually results in the better performance.</li><li>You can connect Node Js to various databases like MySql, MongoDB etc.</li></ol>



<h3>Creating a basic server using Node JS</h3>



<figure class="wp-block-image"><img src="https://www.maxester.com/blog/wp-content/uploads/2023/12/in.png" alt="" class="wp-image-1222" srcset="https://www.maxester.com/blog/wp-content/uploads/2023/12/in.png 418w, https://www.maxester.com/blog/wp-content/uploads/2023/12/in-300x118.png 300w" sizes="(max-width: 418px) 100vw, 418px" /><figcaption>Code to create the server<br></figcaption></figure>



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



<p></p>
<p>The post <a rel="nofollow" href="https://www.maxester.com/blog/2024/01/03/wha-is-node-js/">What is Node 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/01/03/wha-is-node-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>
