<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[React JS]]></title><description><![CDATA[React JS]]></description><link>https://dilshad-react-day4.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Tue, 01 Sep 2026 00:03:11 GMT</lastBuildDate><atom:link href="https://dilshad-react-day4.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[React Basic fundamentals questions]]></title><description><![CDATA[Is JSX mandatory for react?
No,JSX is not mandatory for react, but it is highly recommended.
JSX is syntax extension that allows you to write HTML like syntax within Javascript,making it easier to create and visualize structure of react components.
I...]]></description><link>https://dilshad-react-day4.hashnode.dev/react-basic-fundamentals-questions</link><guid isPermaLink="true">https://dilshad-react-day4.hashnode.dev/react-basic-fundamentals-questions</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[React]]></category><dc:creator><![CDATA[Md Dilshad Alam]]></dc:creator><pubDate>Mon, 20 Jan 2025 20:30:36 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/iOykDIkZLQw/upload/3b69155d1ffb48b067a002add9aef86a.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-is-jsx-mandatory-for-react">Is <code>JSX</code> mandatory for react?</h3>
<p>No,<code>JSX</code> is not mandatory for react, but it is highly recommended.</p>
<p><code>JSX</code> is syntax extension that allows you to write HTML like syntax within Javascript,making it easier to create and visualize structure of react components.</p>
<p>It enhance readability and maintainability of your code.</p>
<h3 id="heading-is-es6-mandatory-for-react">Is <code>ES6</code> mandatory for react?</h3>
<p>The answer is No, we can use some other imports like <code>create-react-class</code> for using the component functionality.</p>
<p>But it is highly recommended to use ES6 because it introduces several features and syntax improvements that makes it more efficient and readable.</p>
<p>Some Features of ES6:</p>
<p>Arrow Functions: Simplify syntax and automatically bound component instance using <code>this</code> keyword that a normal function can’t do.</p>
<p>Destructuring: Makes it easier to extract values from objects and arrays.</p>
<p>Template Literals: Allow easier to embed variable within <code>string</code>.</p>
<p>Module:It also enable <code>import</code> and <code>export</code> for better code organization.</p>
<p><code>{TitleComponent} or {&lt;TitleComponent /&gt; or {&lt;TitleComponet&gt;&lt;/TitleComponent&gt;}</code> in <code>JSX</code> is same or different.</p>
<p><code>{TitleComponent</code>} or {&lt;TitleComponent /&gt; or {&lt;TitleComponet&gt;&lt;/TitleComponent&gt;} in <code>JSX</code> is same.</p>
<p>What is &lt;React.Fragment&gt;&lt;/React.Fragment&gt; and &lt;&gt;&lt;/&gt;</p>
<p>&lt;&gt;&lt;/&gt; is shorthand notation of &lt;React.Fragment&gt;&lt;/React.Fragment&gt;</p>
<p>It is used for when you want to return multiple elements from a component without wrapping them in a parent like a &lt;div&gt;.</p>
<h3 id="heading-what-is-reconciliation-in-react">What is <code>Reconciliation</code> in React.</h3>
<p>Reconciliation is the process by which React update the DOM to match the virtual DOM. When the state or props component change, React create a new virtual DOM tree and compares it with the previous one.This process is called reconciliation.</p>
<h3 id="heading-why-do-we-need-keys-in-react">Why do we need <code>keys</code> in React?</h3>
<p>Because, Assume we have a parent container and inside this we have list of same level of react component .Now if you want to add a new React component between two react component then <code>key</code> helps in the organization.</p>
<h3 id="heading-can-we-use-index-as-keys">Can we use index as keys?</h3>
<p>Using the index as keys in React is possible but it’s generally not recommended.</p>
<p>Keys help React identify which items have changed, been added ,or removed, and they should be unique and stable.</p>
<p>It is useful when list items are reordered or filtered.</p>
<h3 id="heading-what-is-props-in-react">What is props in React?</h3>
<p><code>props</code> is (short for <code>properties</code>) are way to pass data from a parent component to child component.</p>
<p>They allow you to configure and child components by providig them the necessary information.</p>
<p>props are read-only, meaning that it can not be modify by child component</p>
<p>Examples:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> ParentComponent = <span class="hljs-function">() =&gt;</span> {
  <span class="hljs-keyword">return</span> <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">ChildComponent</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"Dastarkhan"</span> <span class="hljs-attr">age</span>=<span class="hljs-string">{5}</span> /&gt;</span></span>;
};

<span class="hljs-keyword">const</span> ChildComponent = <span class="hljs-function">(<span class="hljs-params">{ name, age }</span>) =&gt;</span> {
  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>{name}<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Age: {age}<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
  );
};
</code></pre>
<p>What is <code>Config Driven UI</code>?</p>
<p>Config-Driven UI is a design pattern where the structure and behaviour of the user defined using configuration files rather than being hard-coded in the application.</p>
<p>These configuration files are typically in formats like JSON or YAML. By separating the UI logic from the code, developers can easily modify the UI without changing the underlying codebase</p>
]]></content:encoded></item></channel></rss>