<?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>what is component in react - Interview Questions</title>
	<atom:link href="https://www.wikitechy.com/interview-questions/tag/what-is-component-in-react/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wikitechy.com/interview-questions/tag/what-is-component-in-react/</link>
	<description>Interview Questions</description>
	<lastBuildDate>Wed, 04 May 2022 07:16:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.1</generator>
	<item>
		<title>What are the types of React component ?</title>
		<link>https://www.wikitechy.com/interview-questions/reactjs/what-are-the-types-of-react-component/</link>
					<comments>https://www.wikitechy.com/interview-questions/reactjs/what-are-the-types-of-react-component/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Sat, 26 Mar 2022 10:47:23 +0000</pubDate>
				<category><![CDATA[ReactJS]]></category>
		<category><![CDATA[class component react]]></category>
		<category><![CDATA[functional component react]]></category>
		<category><![CDATA[react component example]]></category>
		<category><![CDATA[react component lifecycle]]></category>
		<category><![CDATA[react components]]></category>
		<category><![CDATA[react top-level-api components and its types in reactjs what are the types of components available in react]]></category>
		<category><![CDATA[reactjs components]]></category>
		<category><![CDATA[types of react components]]></category>
		<category><![CDATA[types of react js]]></category>
		<category><![CDATA[what are the types of components]]></category>
		<category><![CDATA[what is component in react]]></category>
		<category><![CDATA[what is the type of a react component]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4001</guid>

					<description><![CDATA[It is one of the core building blocks of React. In React we develop every application and it will be made of pieces, that is known as component. Components make&#8230;]]></description>
										<content:encoded><![CDATA[<ul>
<li style="text-align: justify;">It is one of the core building blocks of React.</li>
<li style="text-align: justify;">In React we develop every application and it will be made of pieces, that is known as component.</li>
<li style="text-align: justify;">Components make the task of building UIs much easier.</li>
<li style="text-align: justify;">We see that UI broken down into multiple individual pieces called components and work on them independently and merge them all in a parent component which will be your final UI.</li>
<li style="text-align: justify;">React Component basically return a piece of JSX code that tells what should be rendered on the screen.</li>
<li style="text-align: justify;">In React component there are two types:
<ul>
<li>Functional Components</li>
<li>Class Components</li>
</ul>
</li>
</ul>
<p><img decoding="async" loading="lazy" class="alignnone wp-image-4027 size-full" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/types-of-react-components-1.png" alt="" width="748" height="264" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/types-of-react-components-1.png 748w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/types-of-react-components-1-300x106.png 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/types-of-react-components-1-390x138.png 390w" sizes="(max-width: 748px) 100vw, 748px" /></p>
<h4 id="functional-components" style="text-align: justify;">Functional Components</h4>
<p><img decoding="async" loading="lazy" class="alignnone size-full wp-image-4278" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/components-in-components.gif" alt="" width="1265" height="644" /></p>
<ul style="text-align: justify;">
<li>Functional components are simply JS functions.</li>
<li>In React we can create Functional Component by writing a JS function.</li>
<li>To create React app efficient, we use functional component only when we are sure that our component does not require to interact with any other components.</li>
<li>It does not require data from other components.</li>
</ul>
<p style="text-align: justify;"><strong>For example,</strong></p>
[pastacode lang=&#8221;markup&#8221; manual=&#8221;const%20Democomponent%3D()%3D%3E%0A%0A%C2%A0%C2%A0%C2%A0%20%7B%0A%0A%C2%A0%20%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0return%20%3Ch1%3EWelcome%20to%20Kaashiv!%3C%2Fh1%3E%3B%0A%0A%C2%A0%C2%A0%C2%A0%20%7D&#8221; message=&#8221;&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;/]
<h4 id=""><img decoding="async" loading="lazy" class="alignnone size-full wp-image-4279 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/components-in-files.gif" alt="" width="1271" height="569" /></h4>
<h4 id="class-components" style="text-align: justify;">Class Components</h4>
<ul>
<li style="text-align: justify;">The class components are much like the functional component but has a few additional capabilities that makes class component a little more complicated than the functional components.</li>
<li style="text-align: justify;">The class components can work with each other where functional components are not aware of the other components in your program.</li>
<li style="text-align: justify;">From one class component to other class components, we can pass the data.</li>
<li style="text-align: justify;">In React we use JavaScript ES6 classes to create class-based components.</li>
</ul>
<p><strong>For example,</strong></p>
[pastacode lang=&#8221;markup&#8221; manual=&#8221;class%20Democomponent%20extends%20React.Component%0A%20%20%20%7B%0A%20%20%20%20%20%20%20render()%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20return%20%3Ch1%3EWelcome%20to%20Kaashiv!%3C%2Fh1%3E%3B%0A%20%20%20%20%20%20%7D%0A%20%20%7D%0A&#8221; message=&#8221;&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;/]
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/reactjs/what-are-the-types-of-react-component/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
