<?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 component example - Wikitechy</title>
	<atom:link href="https://www.wikitechy.com/interview-questions/tag/react-component-example/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wikitechy.com/interview-questions/tag/react-component-example/</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.9.4</generator>

<image>
	<url>https://www.wikitechy.com/interview-questions/wp-content/uploads/2025/10/cropped-wikitechy-icon-32x32.png</url>
	<title>react component example - Wikitechy</title>
	<link>https://www.wikitechy.com/interview-questions/tag/react-component-example/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<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 the task of building UIs much easier. We see that UI broken down into multiple individual pieces called components and work on them independently and [&#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 fetchpriority="high" decoding="async" 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" 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>
<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">const Democomponent=()=&gt;<br/><br/>    {<br/><br/>            return &lt;h1&gt;Welcome to Kaashiv!&lt;/h1&gt;;<br/><br/>    }</code></pre> </div>
<h4 id=""><img decoding="async" 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>
<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 Democomponent extends React.Component<br/>   {<br/>       render(){<br/>             return &lt;h1&gt;Welcome to Kaashiv!&lt;/h1&gt;;<br/>      }<br/>  }</code></pre> </div>
]]></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>
