<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hiren Timbadiya</title>
    <description>The latest articles on DEV Community by Hiren Timbadiya (@hirentimbadiya).</description>
    <link>https://dev.to/hirentimbadiya</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F956240%2Fa1c5d2d1-0cac-4c2b-acb7-a3af9cbc8043.jpeg</url>
      <title>DEV Community: Hiren Timbadiya</title>
      <link>https://dev.to/hirentimbadiya</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hirentimbadiya"/>
    <language>en</language>
    <item>
      <title>Javascript Vs Typescript</title>
      <dc:creator>Hiren Timbadiya</dc:creator>
      <pubDate>Mon, 06 Feb 2023 15:18:47 +0000</pubDate>
      <link>https://dev.to/hirentimbadiya/javascript-vs-typescript-1jg5</link>
      <guid>https://dev.to/hirentimbadiya/javascript-vs-typescript-1jg5</guid>
      <description>&lt;h4&gt;
  
  
  JavaScript and TypeScript are both programming languages used for web development, but they have several key differences.
&lt;/h4&gt;

&lt;h3&gt;
  
  
  Typing System :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TypeScript has a strong typing&lt;/strong&gt; system, while &lt;strong&gt;JavaScript is dynamically typed.&lt;/strong&gt; This means that in TypeScript, variables must be declared with a specific type (e.g. string, number, etc.), &lt;/li&gt;
&lt;li&gt;whereas &lt;strong&gt;in JavaScript, the type of a variable can change during runtime.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Object-Oriented Features :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;TypeScript supports object-oriented programming concepts such as interfaces, classes, and inheritance, which are not available in pure JavaScript.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Compilation :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;TypeScript is a statically compiled language, which means that the code written in TypeScript is compiled into JavaScript before it is executed.&lt;/li&gt;
&lt;li&gt;This can lead to better performance and improved error handling, as some errors can be caught during the compilation process.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Namespaces :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;TypeScript has the concept of namespaces, which provide a way to organize code into logical groups and avoid naming conflicts.&lt;/li&gt;
&lt;li&gt;JavaScript does not have this feature.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Tooling :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;TypeScript has better tooling support than JavaScript, including integrated development environments (IDEs) with improved code completion, syntax highlighting, and error checking.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Learning Curve :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;TypeScript has a steeper learning curve than JavaScript, as it introduces several new concepts, such as classes and interfaces, that are not found in JavaScript.&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  In conclusion, TypeScript is a superset of JavaScript that offers several additional features and improved tooling.
&lt;/h5&gt;

&lt;h5&gt;
  
  
  It is especially useful for large-scale projects and for teams working on a codebase, as it provides a more organized and maintainable codebase.
&lt;/h5&gt;

&lt;h5&gt;
  
  
  However, for smaller projects or for those who are more familiar with JavaScript, pure JavaScript may be a better choice.
&lt;/h5&gt;

&lt;h4&gt;
  
  
  that's wrap , like and share if it helped you understand difference and follow me for more!!
&lt;/h4&gt;

</description>
      <category>devto</category>
      <category>announcement</category>
      <category>crypto</category>
      <category>web3</category>
    </item>
    <item>
      <title>React.JS Props: A Complete Guide with Examples</title>
      <dc:creator>Hiren Timbadiya</dc:creator>
      <pubDate>Sat, 04 Feb 2023 08:30:13 +0000</pubDate>
      <link>https://dev.to/hirentimbadiya/reactjs-props-a-complete-guide-with-examples-4l9l</link>
      <guid>https://dev.to/hirentimbadiya/reactjs-props-a-complete-guide-with-examples-4l9l</guid>
      <description>&lt;h2&gt;
  
  
  About React
&lt;/h2&gt;

&lt;p&gt;React.JS is a popular JavaScript library used for building user interfaces. It provides a way to create reusable components and manage the state of an application. In React.JS, props (short for properties) are a way to pass data from a parent component to a child component.&lt;/p&gt;

&lt;h2&gt;
  
  
  About this Blog Post
&lt;/h2&gt;

&lt;p&gt;In this blog post, we will be diving into the concept of props in React.JS and exploring how they are used. We will look at several examples to help you understand how props work and how to use them effectively in your applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are Props in React.JS?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;In React.JS, props are the means by which a parent component can pass data to its child component. &lt;/li&gt;
&lt;li&gt;They are used to pass data from one component to another and are a critical part of React.JS. &lt;/li&gt;
&lt;li&gt;Props are read-only and cannot be modified within the child component.&lt;/li&gt;
&lt;li&gt; They are used to pass information, such as values, functions, or objects, from the parent component to the child component.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Example 1: Passing a Value as a Prop
&lt;/h2&gt;

&lt;p&gt;In the following example, we have a parent component that passes a value as a prop to a child component. The child component then displays the value as text on the screen.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// parent component
function App() {
  return (
      {/* passing props as attributes*/}
      &amp;lt;Note
            id="1"
            title="this is title"
            content="blog is about props"
      /&amp;gt;
  );
}
// child component
function Note(props) {
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;{props.title}&amp;lt;/h1&amp;gt;
      &amp;lt;p&amp;gt;{props.content}&amp;lt;/p&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Example 2: Passing a Function as a Prop
&lt;/h2&gt;

&lt;p&gt;In the following example, we have a parent component that passes a function as a prop to a child component. The child component then calls the function when a button is clicked.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// parent component
function App() {
// event handling function
  const printNote = (content) =&amp;gt; {
    console.log(content);
  };
  return (
      &amp;lt;Note
            id="1"
            title="this is title"
            content="blog is about props"
            onClickNote={printNote}
       /&amp;gt;
  );
}

// child component
function Note(props) {
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;{props.title}&amp;lt;/h1&amp;gt;
      &amp;lt;p&amp;gt;{props.content}&amp;lt;/p&amp;gt;
      &amp;lt;button
        // onclick it triggers the onClickNote which is in App.jsx
        // which essentially will trigger printNote function to print the note on console.
        onClick={() =&amp;gt; {
          props.onClickNote(props.content);
        }}
      &amp;gt;
        // delete icon component
        &amp;lt;DeleteIcon /&amp;gt;
      &amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Example 3: Passing an Object as a Prop
&lt;/h2&gt;

&lt;p&gt;In the following example, we have a parent component that passes an object as a prop to a child component. The child component then uses the object to display information on the screen.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// parent component
function App(){
    const user = {
       name: "Hiren Timbadiya",
       email: "hiren@email.com"
    };
    return (
      &amp;lt;Note user={user} /&amp;gt;
    );
}

// child component
function Note(props){
    return (
      &amp;lt;div&amp;gt;
        &amp;lt;p&amp;gt;Name: {props.user.name}&amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;Email: {props.user.email}&amp;lt;/p&amp;gt;
      &amp;lt;/div&amp;gt;
    );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Thank You for reading!! follow me for more&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>devto</category>
      <category>announcement</category>
      <category>devrel</category>
      <category>royalties</category>
    </item>
    <item>
      <title>broke it😎</title>
      <dc:creator>Hiren Timbadiya</dc:creator>
      <pubDate>Fri, 09 Dec 2022 10:42:17 +0000</pubDate>
      <link>https://dev.to/hirentimbadiya/broke-it-584j</link>
      <guid>https://dev.to/hirentimbadiya/broke-it-584j</guid>
      <description>&lt;p&gt;&lt;strong&gt;contex : 1 xor 2  is 3 which is greater than 1*2 which is 2&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EoEQngkg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jaua6uorq5th5cobaoww.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EoEQngkg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jaua6uorq5th5cobaoww.png" alt="Image description" width="880" height="490"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>chatgpt</category>
      <category>ai</category>
      <category>openai</category>
    </item>
  </channel>
</rss>
