<?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 es6 arrow functions - Wikitechy</title>
	<atom:link href="https://www.wikitechy.com/interview-questions/tag/react-es6-arrow-functions/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wikitechy.com/interview-questions/tag/react-es6-arrow-functions/</link>
	<description>Interview Questions</description>
	<lastBuildDate>Wed, 04 May 2022 07:09:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://www.wikitechy.com/interview-questions/wp-content/uploads/2025/10/cropped-wikitechy-icon-32x32.png</url>
	<title>react es6 arrow functions - Wikitechy</title>
	<link>https://www.wikitechy.com/interview-questions/tag/react-es6-arrow-functions/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>What is Arrow function in React ? How is it used ?</title>
		<link>https://www.wikitechy.com/interview-questions/reactjs/what-is-arrow-function-in-react-how-is-it-used/</link>
					<comments>https://www.wikitechy.com/interview-questions/reactjs/what-is-arrow-function-in-react-how-is-it-used/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Sat, 26 Mar 2022 12:33:08 +0000</pubDate>
				<category><![CDATA[ReactJS]]></category>
		<category><![CDATA[arrow function in react]]></category>
		<category><![CDATA[arrow function in react example]]></category>
		<category><![CDATA[arrow function in react native]]></category>
		<category><![CDATA[passing functions to components]]></category>
		<category><![CDATA[react arrow function]]></category>
		<category><![CDATA[react arrow function component]]></category>
		<category><![CDATA[react arrow function props]]></category>
		<category><![CDATA[react arrow function vs function]]></category>
		<category><![CDATA[react arrow function with parameters]]></category>
		<category><![CDATA[react es6 arrow functions]]></category>
		<category><![CDATA[react onclick arrow function]]></category>
		<category><![CDATA[what is arrow function in react]]></category>
		<category><![CDATA[what is arrow function in react how is it used]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4006</guid>

					<description><![CDATA[They are more of a brief syntax for writing the function expression. It is also known as ‘fat arrow ‘(=>) the functions. This keyword represented the object that called the function, which could be the window, the document, a button or whatever in a regular function. It allows to bind the context of the components [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-4272" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/arrow-functions.png" alt="" width="954" height="635" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/arrow-functions.png 954w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/arrow-functions-300x200.png 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/arrow-functions-768x511.png 768w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/arrow-functions-390x260.png 390w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/arrow-functions-820x546.png 820w" sizes="(max-width: 954px) 100vw, 954px" /></p>
<ul>
<li style="text-align: justify;">They are more of a brief syntax for writing the function expression. It is also known as <em>‘fat arrow</em> ‘(<strong>=></strong>) the functions.</li>
<li style="text-align: justify;">This keyword represented the object that called the function, which could be the window, the document, a button or whatever in a regular function.</li>
<li style="text-align: justify;">It allows to bind the context of the components properly since in ES6 auto binding is not available by default.</li>
<li style="text-align: justify;">While working with the higher-order functions, Arrow functions are most useful.</li>
<li style="text-align: justify;">This keyword <em>always</em> represents the object that defined the arrow function in arrow function.</li>
</ul>
<p><img decoding="async" class="alignnone size-full wp-image-4274" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/arrow-function.jpg" alt="" width="1057" height="728" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/arrow-function.jpg 1057w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/arrow-function-300x207.jpg 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/arrow-function-1024x705.jpg 1024w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/arrow-function-768x529.jpg 768w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/arrow-function-390x269.jpg 390w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/arrow-function-820x565.jpg 820w" sizes="(max-width: 1057px) 100vw, 1057px" /></p>
<p>For example, in <strong>regular</strong> <strong>functions:</strong></p>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-markup code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-markup code-embed-code">class Header {<br/>  constructor() {<br/>    this.color = &quot;Blue&quot;;<br/>  }<br/><br/>//Regular function:<br/>  changeColor = function() {<br/>    document.getElementById(&quot;demo&quot;).innerHTML += this;<br/>  }<br/>}<br/><br/>const myheader = new Header();<br/><br/>//The window object calls the function:<br/>window.addEventListener(&quot;load&quot;, myheader.changeColor);<br/><br/>//A button object calls the function:<br/>document.getElementById(&quot;btn&quot;).addEventListener(&quot;click&quot;, myheader.changeColor);</code></pre> </div>
<p>For example, in <strong>Arrow</strong> <strong>functions:</strong></p>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-markup code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-markup code-embed-code">class Header {<br/>  constructor() {<br/>    this.color = &quot;Blue&quot;;<br/>  }<br/><br/>//Arrow function:<br/>  changeColor = () => {<br/>    document.getElementById(&quot;demo&quot;).innerHTML += this;<br/>  }<br/>}<br/><br/>const myheader = new Header();<br/><br/><br/>//The window object calls the function:<br/>window.addEventListener(&quot;load&quot;, myheader.changeColor);<br/><br/>//A button object calls the function:<br/>document.getElementById(&quot;btn&quot;).addEventListener(&quot;click&quot;, myheader.changeColor);</code></pre> </div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/reactjs/what-is-arrow-function-in-react-how-is-it-used/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
