<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Garvit Chittora on Medium]]></title>
        <description><![CDATA[Stories by Garvit Chittora on Medium]]></description>
        <link>https://medium.com/@garvitchittora?source=rss-2804498f0eed------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*P097foZpjVMximUoEmpRPQ.jpeg</url>
            <title>Stories by Garvit Chittora on Medium</title>
            <link>https://medium.com/@garvitchittora?source=rss-2804498f0eed------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 25 Nov 2026 01:23:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@garvitchittora/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[All about ReactJS]]></title>
            <link>https://medium.com/nybles/all-about-reactjs-bd7b263008f1?source=rss-2804498f0eed------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd7b263008f1</guid>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[angularjs]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Garvit Chittora]]></dc:creator>
            <pubDate>Wed, 08 Jul 2020 12:33:29 GMT</pubDate>
            <atom:updated>2020-10-07T07:59:40.231Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/135/1*DihQcVV6-bChJxNAXKwQrg.png" /></figure><p><strong>ReactJS is a JavaScript library </strong>maintained by Facebook and Instagram. It is mainly used to develop UI. ReactJS is component-based so that it provides readability of the DOM component.</p><h3>Points which we will cover in this article :</h3><ol><li><em>Features of ReactJS</em></li><li><em>ReactJS vs AngularJS</em></li><li><em>Now the most confusing Question difference between library and Framework?</em></li><li><em>Prerequisite before using ReactJS</em></li><li><em>Getting start with ReactJS</em></li><li><em>How to make React component</em></li><li><em>Styling with CSS</em></li><li><em>Styling with Ant Design</em></li><li><em>React Props</em></li><li>React State</li><li><em>My App in ReactJS</em></li></ol><h3>Features of ReactJS :</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*-JO6zhZG05ZgfbR2IH3kmQ.png" /><figcaption>React Features</figcaption></figure><ol><li>JSX</li><li>Components</li><li>One-way Data Binding</li><li>Virtual DOM</li><li>Simplicity</li><li>Performance</li></ol><h3>ReactJS (Library) Vs AngularJS (Framework):</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*ry9pfFWRP1S8fYPb9tT8xA.png" /><figcaption>ReactJS vs AngularJS</figcaption></figure><h4>When to Use React for Developing an App?</h4><p><em>React is the right fit for your app project when:-</em></p><ul><li><em>Your team has expertise in HTML, CSS and JavaScript.</em></li><li><em>You need a highly customized specific app solution.</em></li><li><em>A myriad of components with different and often variable states — active/inactive navigation items, dynamic inputs, a user log in and access permissions, buttons enabled/disabled, etc. is involved in the development process.</em></li><li><em>Components are expected to be shared across multiple applications as the app project expands.</em></li><li><em>You wish to spend time on pre-development preparation.</em></li></ul><h4>When to Consider Angular for App Development?</h4><p><em>Going with the Angular framework in a good choice when:-</em></p><ul><li><em>Your team has experience with Java, C# and previous versions of Angular.</em></li><li><em>App complexity lies from Low to Medium level.</em></li><li><em>You embrace ready-to-use solutions and need higher productivity.</em></li><li><em>You wish to embrace Bundle Budgets in the CLI option, which informs the developers when the app bundle size exceeds by the pre-decided value. In other words, selecting Angular is the right decision when you want to regulate app size.</em></li><li><em>You need a large-scale feature-rich application.</em></li></ul><h4>Conclusion:</h4><ul><li>Your or your team’s preferences</li><li>Do you prefer an all-in-one framework solution over building your own structure with more libraries?</li><li>Does your app depend heavily on dynamic component instantiation?</li><li>Do you need a mobile version for your application? In that case, you could reuse a lot of code with React and React Native</li><li>Are you forced to have SSR working? As of now, React works better.</li></ul><h3>Now the most confusing Question difference between library and Framework?🤐</h3><p>“ReactJS a library whileAngularJS is a framework.”</p><p>The<strong> Technical Difference</strong> between a framework and library lies in a term called inversion of control.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*RhmDJoFvJg0dHdel" /><figcaption>Library and Framework</figcaption></figure><p>“A framework inverts the control of the program. It tells the developer what they need. A library doesn’t. The programmer calls the library where and when <em>they</em> need it.”</p><ul><li>Library: Call us to get the job done.</li><li>Framework: You don’t call us, we’ll call you.</li></ul><h3>Prerequisite before using ReactJS:</h3><p>Before starting with ReactJS, you should have intermediate experience in:</p><ul><li>HTML</li><li>CSS</li><li>JavaScript</li></ul><h3>Getting start with ReactJS :</h3><p>If you have NPM and Node.js installed, you can create a React application by first installing the create-react-app.😍</p><pre>C:\Users\<em>Your Name</em>&gt;npm install -g create-react-app</pre><p>Then you can create a React application, let’s create one called myfirstreact.</p><p>Run this command to create a React application named myfirstreact:</p><pre>C:\Users\<em>Your Name</em>&gt;npx create-react-app myfirstreact</pre><p>Now you are ready to run your first <em>real</em> React application</p><pre>C:\Users\<em>Your Name</em>&gt;cd myfirstreact<br>C:\Users\<em>Your Name</em>\myfirstreact&gt;npm start</pre><p>A new browser window will pop up with your newly created React App! If not, open your browser and type localhost:3000 in the address bar.</p><p>If all things work perfectly then it will look like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/0*Ykp_wim-WsNl2ip1.png" /></figure><h3>How to make React component :</h3><p>Components are independent and reusable bits of code. They serve the same purpose as JavaScript functions, but work in isolation and returns HTML via a render function.</p><p>index.js</p><pre>import React from &#39;react&#39;;<br>import ReactDOM from &#39;react-dom&#39;;</pre><pre>class Hello extends React.Component {<br>  render() {<br>    return &lt;h2&gt;Hi, I am a Garvit !&lt;/h2&gt;;<br>  }<br>}</pre><pre>ReactDOM.render(&lt;Hello/&gt;, document.getElementById(&#39;root&#39;));</pre><p>index.html</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>  &lt;head&gt;<br>    &lt;meta charset=&quot;utf-8&quot; /&gt;<br>    &lt;meta name=&quot;viewport&quot;<br>      content=&quot;width=device-width, initial-scale=1&quot; /&gt;<br>    &lt;title&gt;React App&lt;/title&gt;<br>  &lt;/head&gt;<br>  &lt;body&gt;</pre><pre>&lt;div id=&quot;root&quot;&gt;&lt;/div&gt;</pre><pre>&lt;/body&gt;<br>&lt;/html&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*F7GAD9EVMtzlj8dZ1sNQow.png" /><figcaption>Result of above code</figcaption></figure><h3>Styling with CSS:</h3><p><strong>Method 1:Inline Styling</strong></p><p>To style an element with the inline style attribute, the value must be a JavaScript object. Since the inline CSS is written in a JavaScript object, properties with two names like,background-color must be written with camel case backgroundColor .</p><pre>style={{textAlign:&#39;center&#39;,fontFamily:&#39;arial&#39;,color:&#39;red&#39;}}</pre><p>adding this type of text where styling is needed.</p><p>for example:</p><pre>import React from &#39;react&#39;;</pre><pre>import ReactDOM from &#39;react-dom&#39;;</pre><pre>class Hello extends React.Component {</pre><pre>render() {</pre><pre>return &lt;h2 <br>style={{textAlign:&#39;center&#39;,fontFamily:&#39;arial&#39;,color:&#39;red&#39;}}&gt;<br>Hi, I am a Garvit !<br>&lt;/h2&gt;;</pre><pre>}</pre><pre>}</pre><pre>ReactDOM.render(&lt;Hello/&gt;, document.getElementById(&#39;root&#39;));</pre><p><strong>Method 2:CSS Stylesheet</strong></p><p>You can write your CSS styling in a separate file, just save the file with the .css file extension, and import it in your application.</p><p>for example:</p><p>index.js</p><pre>import React from &#39;react&#39;;</pre><pre>import ReactDOM from &#39;react-dom&#39;;</pre><pre>// import index.css</pre><pre>import &#39;./index.css&#39;;</pre><pre>class Hello extends React.Component {</pre><pre>render() {</pre><pre>return &lt;h2 className=&quot;heading&quot;&gt;Hi, I am a Garvit !&lt;/h2&gt;;</pre><pre>}</pre><pre>}</pre><pre>ReactDOM.render(&lt;Hello/&gt;, document.getElementById(&#39;root&#39;));</pre><p>index.css</p><pre>.heading{</pre><pre>text-align: center;</pre><pre>color: red;</pre><pre>font-family: arial;</pre><pre>}</pre><p>Both methods will give the same result as given below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6HDtqOH-UgiZPtmF5T9ehA.png" /><figcaption>Result</figcaption></figure><h3>Styling with Ant Design:</h3><p>Ant Design is my personal favorite styling library.</p><p>Ant Design is a React UI library that has a plethora of easy-to-use components that are useful for building elegant user interfaces. Created by Chinese conglomerate Alibaba.</p><blockquote>Installation</blockquote><pre>npm install antd</pre><blockquote>Then Import CSS</blockquote><pre>import &#39;antd/dist/antd.css&#39;; // or &#39;antd/dist/antd.less&#39;</pre><p>antd provides plenty of UI components to enrich your web applications, and we will improve components experience consistently.</p><p>For example:</p><p>If you need to add an icon of the Instagram, search button and input box.</p><pre>import { Button,Input } from &#39;antd&#39;;</pre><p>whole code:</p><pre>import React from &#39;react&#39;;</pre><pre>import ReactDOM from &#39;react-dom&#39;;</pre><pre>// import index.css</pre><pre>import &#39;./index.css&#39;;</pre><pre>//for antdesign</pre><pre>import &#39;antd/dist/antd.css&#39;;</pre><pre>import { Button,Input } from &#39;antd&#39;;</pre><pre>import { SearchOutlined ,InstagramOutlined,UserOutlined} from &#39;@ant-design/icons&#39;;</pre><pre>class Hello extends React.Component {</pre><pre>render() {</pre><pre>return &lt;div className=&quot;heading&quot;&gt;</pre><pre>&lt;InstagramOutlined style={{fontSize:&#39;30px&#39;,color:&#39;black&#39; }}/&gt;</pre><pre>&lt;div&gt;</pre><pre>&lt;Button type=&quot;primary&quot; icon={&lt;SearchOutlined /&gt;}&gt;</pre><pre>Search</pre><pre>&lt;/Button&gt;</pre><pre>&lt;/div&gt;</pre><pre>&lt;div style={{padding:&#39;30px&#39;}}&gt;</pre><pre>&lt;Input size=&quot;large&quot; placeholder=&quot;large size&quot; style={{width:&#39;50%&#39;}} prefix={&lt;UserOutlined /&gt;} /&gt;</pre><pre>&lt;/div&gt;</pre><pre>&lt;/div&gt;;</pre><pre>}</pre><pre>}</pre><pre>ReactDOM.render(&lt;Hello/&gt;, document.getElementById(&#39;root&#39;));</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BtXr12oTnj0WNCACswQ4xw.png" /><figcaption>Result of above code</figcaption></figure><h3>React Props:</h3><p>Props are arguments passed into React components. Props are passed to components via HTML attributes. React Props are like function arguments in JavaScript <em>and</em> attributes in HTML.</p><p>For example:</p><pre>import React from &#39;react&#39;;</pre><pre>import ReactDOM from &#39;react-dom&#39;;</pre><pre>// import index.css</pre><pre>import &#39;./index.css&#39;;</pre><pre>class Intro extends React.Component {</pre><pre>render() {</pre><pre>return &lt;div className=&quot;heading&quot;&gt;</pre><pre>Hi i am {this.props.Info.name} {this.props.Info.surname}</pre><pre>&lt;/div&gt;;</pre><pre>}</pre><pre>}</pre><pre>class Hello extends React.Component {</pre><pre>render() {</pre><pre>const info={name:&#39;GARVIT&#39;,surname:&#39;CHITTORA&#39;}</pre><pre>return&lt;div&gt;</pre><pre>&lt;Intro Info={info}/&gt;</pre><pre>&lt;/div&gt;</pre><pre>}</pre><pre>}</pre><pre>ReactDOM.render(&lt;Hello/&gt;, document.getElementById(&#39;root&#39;));</pre><p>Result of above code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3sc087AcXYOhuHJRT5N-iQ.png" /><figcaption>result</figcaption></figure><h3>React State:</h3><p>React components has a built-in state object.The state the object is where you store property values that belong to the component. When the state object changes, the component re-renders.</p><p>For example:</p><pre>import React from &#39;react&#39;;</pre><pre>import ReactDOM from &#39;react-dom&#39;;</pre><pre>// import index.css</pre><pre>import &#39;./index.css&#39;;</pre><pre>class Hello extends React.Component {</pre><pre>state={</pre><pre>name:&#39;GARVIT&#39;,</pre><pre>surname:&#39;CHITTORA&#39;,</pre><pre>college:&#39;IIIT ALLAHABAD&#39;</pre><pre>}</pre><pre>render() {</pre><pre>return  &lt;div className=&quot;heading&quot;&gt;</pre><pre>Hi ,I am {this.state.name} {this.state.surname}.&lt;br/&gt; I am currently studing in {this.state.college} .</pre><pre>&lt;/div&gt;;</pre><pre>}</pre><pre>}</pre><pre>ReactDOM.render(&lt;Hello/&gt;, document.getElementById(&#39;root&#39;));</pre><p>Result of above code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gxq1OlyOIfoGmLxgBWU3dQ.png" /><figcaption>Result</figcaption></figure><blockquote><strong><em>How do we update the state of our component?</em></strong></blockquote><p>React components have a method available to them called setState Calling this.setState causes React to re-render your application and update the DOM. Normally, when we want to update our component we just call setState with a new value by passing in an object to the setState function: this.setState({someField:someValue}) .</p><p>for example:</p><pre>import React from &#39;react&#39;;</pre><pre>import ReactDOM from &#39;react-dom&#39;;</pre><pre>// import index.css</pre><pre>import &#39;./index.css&#39;;</pre><pre>class Hello extends React.Component {</pre><pre>state={</pre><pre>name:&#39;GARVIT&#39;,</pre><pre>surname:&#39;CHITTORA&#39;,</pre><pre>college:&#39;IIIT ALLAHABAD&#39;</pre><pre>}</pre><pre>change=()=&gt;{</pre><pre>this.setState({name:&#39;garvit&#39;})</pre><pre>}</pre><pre>render() {</pre><pre>return  &lt;div className=&quot;heading&quot;&gt;</pre><pre>Hi ,I am {this.state.name} {this.state.surname}.&lt;br/&gt; I am currently studing in {this.state.college} .</pre><pre>&lt;br/&gt;</pre><pre>&lt;button onClick={this.change}&gt;Change Name&lt;/button&gt;</pre><pre>&lt;/div&gt;;</pre><pre>}</pre><pre>}</pre><pre>ReactDOM.render(&lt;Hello/&gt;, document.getElementById(&#39;root&#39;));</pre><p>Result of above code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zrVLGvwvWkyob4Q_DkXpMw.png" /><figcaption>Result before clicking the button</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/1*cvq1sjFWvjVuxaikP50JSQ.png" /><figcaption>The result after the button is clicked</figcaption></figure><h3>My App in ReactJS:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GhnZLT138qcO3xwM.jpg" /><figcaption>My Project</figcaption></figure><p>You can find the source code of my app <a href="https://github.com/garvitchittora/garvitchittora-SGR3-moviesy">here</a> and the project link <a href="https://garvitchittora.github.io/garvitchittora-SGR3-moviesy/build/index.html">here</a>.</p><p>Thanks for reading the blog 😃. <em>I hope you have enjoyed this blog post, If yes share it with a friend!.</em>📤</p><p><strong>About me</strong></p><p><em>I am Garvit Chittora, 2nd-year B.Tech IT student at IIIT Allahabad, a member of the Web Development Wing, Geekhaven IIIT Allahabad. </em>I’m also enthusiastic about technology and programming.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd7b263008f1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nybles/all-about-reactjs-bd7b263008f1">All about ReactJS</a> was originally published in <a href="https://medium.com/nybles">Nybles</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>