<?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 problem does context api solve - Wikitechy</title>
	<atom:link href="https://www.wikitechy.com/interview-questions/tag/what-problem-does-context-api-solve/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wikitechy.com/interview-questions/tag/what-problem-does-context-api-solve/</link>
	<description>Interview Questions</description>
	<lastBuildDate>Wed, 04 May 2022 05:47:10 +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>what problem does context api solve - Wikitechy</title>
	<link>https://www.wikitechy.com/interview-questions/tag/what-problem-does-context-api-solve/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>What is Prop Drilling ?</title>
		<link>https://www.wikitechy.com/interview-questions/reactjs/what-is-prop-drilling/</link>
					<comments>https://www.wikitechy.com/interview-questions/reactjs/what-is-prop-drilling/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Mon, 28 Mar 2022 05:39:45 +0000</pubDate>
				<category><![CDATA[ReactJS]]></category>
		<category><![CDATA[Avoid Prop Drilling with React Context]]></category>
		<category><![CDATA[how to avoid prop drilling]]></category>
		<category><![CDATA[how to avoid prop drilling in react]]></category>
		<category><![CDATA[Prop Drilling]]></category>
		<category><![CDATA[prop drilling is good]]></category>
		<category><![CDATA[prop drilling react hooks]]></category>
		<category><![CDATA[prop drilling vs context]]></category>
		<category><![CDATA[react prop drilling example]]></category>
		<category><![CDATA[React Prop-drilling]]></category>
		<category><![CDATA[The upsides of prop drilling in React]]></category>
		<category><![CDATA[what is prop drilling and how can you avoid it]]></category>
		<category><![CDATA[What is prop drilling and how to avoid it ?]]></category>
		<category><![CDATA[what is prop drilling in react]]></category>
		<category><![CDATA[What is React Prop Drilling]]></category>
		<category><![CDATA[what problem does context api solve]]></category>
		<category><![CDATA[why is prop drilling bad]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4009</guid>

					<description><![CDATA[We pass a prop with another component with the help of all the components that come between, this method is known as prop drilling. Prop drilling is basically a situation when the same data is being sent at almost every level due to requirements in the final level. We refer prop drilling to the process [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-4269 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/props-drilling.png" alt="" width="923" height="745" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/props-drilling.png 923w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/props-drilling-300x242.png 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/props-drilling-768x620.png 768w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/props-drilling-390x315.png 390w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/props-drilling-820x662.png 820w" sizes="(max-width: 923px) 100vw, 923px" /></p>
<ul>
<li style="text-align: justify;">We pass a prop with another component with the help of all the components that come between, this method is known as prop drilling.</li>
<li style="text-align: justify;">Prop drilling is basically a situation when the same data is being sent at almost every level due to requirements in the final level.</li>
<li style="text-align: justify;">We refer prop drilling to the process of sending props from a higher-level component to a lower-level component.</li>
</ul>
<p><img decoding="async" class="alignnone size-full wp-image-4023 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/what-is-prop-drilling-in-react-1.png" alt="" width="618" height="380" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/what-is-prop-drilling-in-react-1.png 618w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/what-is-prop-drilling-in-react-1-300x184.png 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/what-is-prop-drilling-in-react-1-390x240.png 390w" sizes="(max-width: 618px) 100vw, 618px" /></p>
<p>&nbsp;</p>
<p><img decoding="async" class="alignnone size-full wp-image-4270" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/react-props.gif" alt="" width="1268" height="647" /></p>
<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">  import React, { useState } from &quot;react&quot;;<br/>  <br/>function Parent() {<br/>  const [fName, setfName] = useState(&quot;firstName&quot;);<br/>  const [lName, setlName] = useState(&quot;LastName&quot;);<br/>  return (<br/>    &lt;&gt;<br/>      &lt;div&gt;This is a Parent component&lt;/div&gt;<br/>      &lt;br /&gt;<br/>      &lt;ChildA fName={fName} lName={lName} /&gt;<br/>    &lt;/&gt;<br/>  );<br/>}<br/>  <br/>function ChildA({ fName, lName }) {<br/>  return (<br/>    &lt;&gt;<br/>      This is ChildA Component.<br/>      &lt;br /&gt;<br/>      &lt;ChildB fName={fName} lName={lName} /&gt;<br/>    &lt;/&gt;<br/>  );<br/>}<br/>  <br/>function ChildB({ fName, lName }) {<br/>  return (<br/>    &lt;&gt;<br/>      This is ChildB Component.<br/>      &lt;br /&gt;<br/>      &lt;ChildC fName={fName} lName={lName} /&gt;<br/>    &lt;/&gt;<br/>  );<br/>}<br/>  <br/>function ChildC({ fName, lName }) {<br/>  return (<br/>    &lt;&gt;<br/>      This is ChildC component.<br/>      &lt;br /&gt;<br/>      &lt;h3&gt; Data from Parent component is as follows:&lt;/h3&gt;<br/>      &lt;h4&gt;{fName}&lt;/h4&gt;<br/>      &lt;h4&gt;{lName}&lt;/h4&gt;<br/>    &lt;/&gt;<br/>  );<br/>}<br/>  <br/>export default Parent;</code></pre> </div>
<p>&nbsp;</p>
<p><strong>Output:</strong></p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-4025 size-full" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/output-for-prop-drilling-1.png" alt="" width="876" height="692" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/output-for-prop-drilling-1.png 876w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/output-for-prop-drilling-1-300x237.png 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/output-for-prop-drilling-1-768x607.png 768w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/output-for-prop-drilling-1-390x308.png 390w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/03/output-for-prop-drilling-1-820x648.png 820w" sizes="(max-width: 876px) 100vw, 876px" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/reactjs/what-is-prop-drilling/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
