<?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 Grishma on Medium]]></title>
        <description><![CDATA[Stories by Grishma on Medium]]></description>
        <link>https://medium.com/@grishmaM?source=rss-ed17a9c25247------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Ou3js49BZ87DNLeQgHxUQQ.jpeg</url>
            <title>Stories by Grishma on Medium</title>
            <link>https://medium.com/@grishmaM?source=rss-ed17a9c25247------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 17:04:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@grishmaM/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[Getting Started With React Hooks]]></title>
            <link>https://medium.com/@grishmaM/getting-started-with-react-hooks-c917d596fa1f?source=rss-ed17a9c25247------2</link>
            <guid isPermaLink="false">https://medium.com/p/c917d596fa1f</guid>
            <category><![CDATA[usestate]]></category>
            <category><![CDATA[useeffect]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[hooks]]></category>
            <category><![CDATA[react-hook]]></category>
            <dc:creator><![CDATA[Grishma]]></dc:creator>
            <pubDate>Mon, 20 Jun 2022 10:39:59 GMT</pubDate>
            <atom:updated>2022-06-20T10:39:59.605Z</atom:updated>
            <content:encoded><![CDATA[<p>React hooks provide an alternative to writing class-based components, and offer an alternative approach to state management and lifecycle methods. Hooks bring to functional components the things we once were only able to do with classes.</p><p>They also work together with existing code, so they can easily be adopted into a codebase. The way Hooks were pitched to the public was that they allow developers to use state in functional components but under the hood, Hooks are much more powerful than that. They allow React Developers to enjoy the following benefits:</p><ul><li>Improved code reuse.</li><li>Better code composition.</li><li>Better defaults.</li><li>Sharing non-visual logic with the use of custom hooks.</li><li>Flexibility in moving up and down the components tree.</li></ul><h3>Basic Hooks</h3><ul><li>useState()</li><li>useEffect()</li><li>useContext()</li></ul><h3><strong>Additional Hooks</strong></h3><ul><li>useReducer()</li><li>useMemo()</li><li>useCallback()</li><li>useImperativeHandle()</li><li>useDebugValue()</li><li>useRef()</li><li>useLayoutEffect()</li></ul><p>I won’t be discussing all these types. But I will focus on some most needed React hook types.</p><h4>1. useState Hooks</h4><p>The useState() hook allows React developers to update, handle, and modify state within functional components without converting them to class components. The code snippet below is a simple counter component that we’ll use to demonstrate the useState() hook’s functionality and syntax.</p><pre>function App() {<br>  const [count, setCount] = useState(1);<br>  const handleClick = () =&gt; setCount(count+ 1)</pre><pre>return <br>      &lt;div&gt; <br>          Count: {count}<br>        &lt;div&gt; <br>        &lt;button onClick={handleClick}&gt;Increase Count&lt;/button&gt;<br>      &lt;/div&gt;<br>   &lt;/div&gt;<br>}</pre><p>As you can see, our component is really straightforward and concise, and it is now a functional component with none of the complexity that a class component would have.</p><p>The useState() hook takes a starting state as an argument and returns the two variables in the array, which can be named anything using array destructuring in JavaScript. The first variable represents the current state, and the second is a function for updating the state by supplying a new state.</p><h4>2. useEffect Hook</h4><p>The useEffect() hook takes a function that has effective code in it. Effects such as mutations, subscriptions, timers, logging, and other effects are not allowed to be placed inside functional components because they would cause a lot of inconsistencies in the UI rendering and possibly confuse problems.</p><p>The effectual function given into the useEffect() hook will run immediately after the render is presented on the screen. Effects are essentially a glimpse into the imperative way of building UIs, which differs from React’s functional approach.</p><p>The useEffect() hook is mostly used for side-effects that interact with the Browser/DOM API or external APIs, such as data fetching and subscriptions. If you’re familiar with React lifecycle methods, you can think of the useEffect() hook as a component mounting, updating, and unmounting function all rolled into one. It allows us to use functional components to mimic lifecycle methods.</p><p>The code snippet below is a simple app that we’ll use to demonstrate the useEffect() hook’s functionality and syntax.</p><pre>import React, {useState, useEffect} from &#39;react&#39;;</pre><pre>function App() {</pre><pre>    const [name, setName] = useState({firstName: &#39;name&#39;, lastName: &#39;lastname&#39;});<br>    const [title, setTitle] = useState(&#39;BIO&#39;);<br>   <br>    useEffect(() =&gt; {<br>      setName({firstName: &#39;Michael&#39;, lastName: &#39;Jackson&#39;})<br>      setTitle({&#39;My Full Name&#39;}<br>    }, [])<br>    <br>    return(<br>        &lt;div&gt;<br>            &lt;h1&gt;Title: {title}&lt;/h1&gt;<br>            &lt;h3&gt;First Name: {name.firstName}&lt;/h3&gt;<br>            &lt;h3&gt;Last Name: {name.lastName}&lt;/h3&gt;<br>        &lt;/div&gt;<br>    );<br>};<br>export default App</pre><h4>3. useContext Hook</h4><p>Even if it isn’t essential, UseContext is a fantastic technique to reduce the complexity of data transportation to various levels in the hierarchy via props.</p><p>Context APIs enable us to construct an object context that saves data and makes it accessible in the hierarchy without the need to send the data as props.</p><pre>import React from &quot;react&quot;;</pre><pre>const NumberContext = React.createContext();</pre><pre>function App() {<br>   return (<br>     &lt;NumberContext.Provider value={3}&gt;<br>        &lt;div&gt;<br>           &lt;Display /&gt;<br>        &lt;/div&gt;<br>     &lt;/NumberContext.Provider&gt;<br>   );<br>}</pre><pre>function Display() {<br>   return (<br>     &lt;NumberContext.Consumer&gt;<br>        {value =&gt; &lt;div&gt;The value is {value}.&lt;/div&gt;}         <br>     &lt;/NumberContext.Consumer&gt;<br>   );<br>}</pre><h3>Best Practices of Using React Hooks</h3><ul><li>Call Hooks At The Top Level</li><li>Only Call Hooks From React Function Components Or Custom Hooks</li><li>Create Your Functional Components In The Right Order</li><li>Use Custom Hooks For Sharing Application Logic</li></ul><p>Overall, Hooks is causing a lot of excitement in the React community since it simplifies state management while removing a lot of what could be considered middleware functionality.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c917d596fa1f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Road Map To Learn ReactJS]]></title>
            <link>https://medium.com/@grishmaM/a-road-map-to-learn-reactjs-12b22b5840f4?source=rss-ed17a9c25247------2</link>
            <guid isPermaLink="false">https://medium.com/p/12b22b5840f4</guid>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[roadmaps]]></category>
            <dc:creator><![CDATA[Grishma]]></dc:creator>
            <pubDate>Fri, 10 Jun 2022 09:18:59 GMT</pubDate>
            <atom:updated>2022-06-10T09:25:30.129Z</atom:updated>
            <content:encoded><![CDATA[<p>No matter, which framework or library you learn for web development, you must know the basic HTML, CSS, and JavaScript, these three are the pillars of web development.</p><p>Here are the topics you should know about JavaScript before moving on to React.</p><ol><li>Basic Syntax ( Includes: Arrays, Variables, Parameters, Arguments, Methods, Map, and Filtering)</li><li>ES6 Classes</li><li>Function Scope vs Block Scope</li><li>Arrow Functions</li><li>Destructuring</li><li>Rest vs Spread Operator</li><li>Promise Objects and How to Use Them with Async and Await.</li><li>Imports and Exports of Modules</li><li>Basic Understanding of Npm</li></ol><p>The reason you need to have a deep JavaScript understanding is that you want to be able to distinguish what is React and what is native JavaScript. If you don’t, React becomes much more complicated to understand than it needs to be.</p><p>Having deep JavaScript knowledge also allows you to build much more complex React applications. Since the majority of React apps are actually pure JS, a strong understanding of JavaScript will drastically decrease the amount of time it takes to learn React js and to write complex applications.</p><p>So you’ve learned the above and you now feel ready for React.js. Here is a quick road map to guide you along your React journey.</p><p><strong>Basic Topics to cover:</strong></p><ol><li>Setting up a Project</li><li>JSX Syntax</li><li>Components</li><li>Props</li><li>State Management</li></ol><p><strong>Setting up a Project</strong>: Before you can start learning <strong>React</strong>, you would need to set up a <strong>React Project</strong>, which is a highly tedious task. Luckily we have awesome tools like the create-react-app to get the job done.</p><p><strong>JSX Syntax</strong>: Typically <strong>React</strong> code is written <strong>JSX</strong> (<strong>JavaScript XML</strong>). You can opt to not use it, using only React.createElement calls only. You should be familiar with the differences between <strong>JSX</strong> and <strong>HTML</strong> like each element must contain a closing tag, the events are in <strong>Camel Case</strong>, and the ability to use <strong>JS</strong> inside the code directly.</p><p><strong>Components</strong>: Although recently, there is a push toward using <strong>Functional Components</strong>, you should have a basic understanding of <strong>Class Components</strong> too to ensure when you work on a legacy code base.</p><p><strong>Props</strong>: Props allow us to pass data from one component to another, but if used inappropriately, it can lead to prop chaining, a highly undesired practice in React projects.</p><p><strong>State Management: </strong>State<strong> </strong>allows you to store data between the component <strong>re-renders</strong>. Updating the state <strong>re-renders</strong> the component and every child accepts the state data as a prop.</p><p><strong>Intermediate Topics to cover:</strong></p><ol><li>Hooks</li><li>Higher-Order Components</li><li>Render Prop Components</li><li>Context</li><li>Routing</li></ol><p><strong>Hooks</strong>: A recent addition in <strong>React 16.8</strong> and it totally changed the React Ecosystem. Hooks introduced features from <strong>Class Components</strong> into <strong>Functional Components</strong>, making it possible to use state, lifecycle methods, context, and refs in Functional Components. <strong>React</strong> also allows you to create <strong>custom hooks</strong> to cater to your personal need, which you should also look into.</p><p><strong>Higher-Order Components:</strong> HOC is a technique in React for reusing component logic. HOCs are not part of the React API. They are a pattern that emerges from React’s compositional nature. Concretely, a higher-order component is a function that takes a component and returns a new component.</p><p><strong>Render Prop Components: </strong>It&#39;s a technique for sharing code between React components using a prop whose value is a function. A component with a render prop takes a function that returns a React element and calls it instead of implementing its own render logic.</p><p><strong>Context: </strong>It provides a way to pass data through the component tree without having to pass props down manually at every level.</p><p><strong>Routing:</strong> Since React is a library and not a framework, it doesn’t have its own routing, but React Router is a library that’s worth looking into.</p><p><strong>Advanced topics to cover:</strong></p><ol><li>Redux</li><li>Styling</li><li>Portals</li><li>Lazy Loading</li><li>Cross-Platform</li><li>Webpack &amp; Babel</li><li>Testing</li><li>TypeScript</li><li>Server rendering</li></ol><p><strong>Redux: </strong>JavaScript library developed for maintaining application states. When you are building a complex application, it will add overhead to manage states across components. Redux helps you store all your states in a single source. And of course, React plays well with Redux</p><p><strong>Styling</strong>: Till now your Application would end up looking pretty<em> </em>basic. Let’s fix it right now. If you don’t want to write custom styling for your application, Material UI, and Semantic UI might be worth a look. It can drastically<em> </em>reduce<em> </em>the effort required as they come with pre-built components.</p><p><strong>Portals:</strong> Occasionally you will run into edge cases where styling elements such as modal to render on top of elements further down the DOM tree becomes a nightmare. In such cases, Portals allow you to render elements outside the default React Root Element, making it far easier to not only style but even group elements together</p><p><strong>Lazy loading:</strong> It&#39;s a design pattern commonly used in web design and development to defer the initialization of an object until the point at which it is needed. It can contribute to efficiency in the program’s operation if properly and appropriately used.</p><p><strong>Cross-Platform</strong>: If you want to use the same logic as your Web App in a Mobile Application and Desktop Application too, <strong>React Native</strong> and <strong>Electron</strong> would be great tools to look into.</p><p><strong>Webpack &amp; Babel</strong>: None of the JSX you write can be understood by a browser, so it has to be transpiled into regular <strong>JS</strong> for Browser to execute it. The transpilation process is handled by <strong>Babel</strong> and bundling everything into a single file is done by <strong>Webpack.</strong></p><p><strong>Testing</strong>: something very few people actually enjoy doing, as it falls under the category of <strong>dark work</strong>, where the things you don’t make any visible changes. But for large applications, it is of crucial importance as a small change might end up breaking the entire application.</p><p><strong>TypeScript</strong>: This is simply one of the core skills you must possess. it is a superset of <strong>JavaScript</strong>, which adds the important, yet optional, strict type system and is the language of choice for any large-scale React application.</p><p><strong>Server rendering(SSR): </strong>Server rendering is one of the coolest features in React. It can be used with any of the back-end technologies.SSR in React helps you to create components in the server and render that as HTML in your browser. And when all the JavaScript modules are downloaded in the browser.</p><p>That’s all you need to know about <strong>React. </strong>Here I just gave you the high-level picture of all the concepts, you can find many documents and tutorials to learn more about the core concepts of React JS.</p><p><strong>Start building some simple applications</strong></p><ol><li>Counter app</li><li>Todo-app</li><li>Calculator app</li><li>Build a shopping cart</li><li>CURD application</li></ol><p>That’s the <strong>Complete React Roadmap</strong>. Hope that helps you plan out your journey to becoming a <strong>React Developer</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12b22b5840f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why and what React js?]]></title>
            <link>https://medium.com/@grishmaM/why-and-what-react-js-60c67c907bda?source=rss-ed17a9c25247------2</link>
            <guid isPermaLink="false">https://medium.com/p/60c67c907bda</guid>
            <category><![CDATA[learn-react-js]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[learn-react-native]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[reactjs]]></category>
            <dc:creator><![CDATA[Grishma]]></dc:creator>
            <pubDate>Mon, 11 Jun 2018 13:02:09 GMT</pubDate>
            <atom:updated>2018-06-11T13:02:53.287Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yk5D5cQB3jd7EiPzrDrD5w.png" /></figure><h4>A quick introduction to the popular JavaScript library.</h4><p>With the front-end world changing on a daily basis, it’s hard to devote time to learning a new framework — especially when that framework could ultimately become a dead end. So, if you’re looking for the next best thing but you’re feeling a little bit lost in the framework jungle, I suggest checking out React. This Blog gives you a basic understanding of React js.</p><p>ReactJS basically is an open-source JavaScript library which is used for building user interfaces specifically for single page applications. It’s used for handling view layer for web and mobile apps. React also allows us to create reusable UI components.</p><p>React allows developers to create large web applications which can change data, without reloading the page. The main purpose of React is to be fast, scalable, and simple. It works only on user interfaces in application. This corresponds to view in the MVC template.</p><p><strong>What are the ReactJS Features?</strong></p><ul><li><em>JSX</em></li><li><em>React Native</em></li><li><em>Single-Way data flow</em></li><li><em>Virtual Document Object Model</em></li><li><em>Component Based</em></li><li><em>Declarative</em></li></ul><p><strong>JSX: </strong>In React, instead of using regular JavaScript for templating, it uses JSX. JSX is simple JavaScript which allows HTML quoting and uses these HTML tag syntax to render subcomponents.</p><p><strong>React Native: </strong>React has native libraries which were announced by Facebook in 2015, which provides the react architecture to native applications like IOS and Android.</p><p><strong>Single-Way data flow: </strong>In React, a set of immutable values are passed to the components renderer as properties in its HTML tags. Component cannot directly modify any properties but can pass a call back function with help of which we can do modifications.</p><p><strong>Virtual Document Object Model:</strong><em> </em>In React, for every DOM object, there is a corresponding “virtual DOM object.” A virtual DOM object is a representation of a DOM object, it creates a virtual copy of the original DOM. It’s a one-way data binding hence manipulating the virtual DOM is quick rather than updating original DOM.</p><p><strong>Component Based: </strong>In React everything is component the web page divided into small components to create a view(or UIs). Every part of applications visuals would be wrapped inside a self-contained module known as a component. Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep the state out of the DOM.Components in ReactJS use to define the visuals and interactions in applications.</p><p><strong>Declarative: </strong>React creates very interactive and dynamic user interface for websites and mobile applications. Create simple views for each state in your application, and React will efficiently update and render just the right components when your data changes. Declarative views make your code more readable and easier to debug.</p><p><strong>Why React Js?</strong></p><p>Now, the main question arises is why one should use ReactJS. There are so many open-source platforms for making the front-end web application development easier, like Angular. Let us take a quick look on the benefits of React over other competitive technologies or frameworks.</p><ul><li><strong><em>Simplicity</em></strong><br>ReactJS is just simpler to grasp right away. The component-based approach, well-defined lifecycle, and use of just plain JavaScript make React very simple to learn, build a professional web (and mobile applications). React uses a special syntax called JSX which allows you to mix HTML with JavaScript.</li><li><strong><em>Easy to learn</em></strong><br>Anyone with a basic previous knowledge in programming can easily understand React, you just need basic knowledge of CSS and HTML.</li><li><strong><em>Native Approach</em></strong><br>React can be used to create mobile applications (React Native). And React is a diehard fan of reusability, meaning extensive code reusability is supported. So at the same time we can make IOS, Android and Web application.</li><li><strong><em>Data Binding</em></strong><br>React uses one-way data binding and an application architecture called Flux controls the flow of data to components through one control point the dispatcher. It’s easier to debug self-contained components of large ReactJS apps.</li><li><strong><em>Performance</em></strong><br>React does not offer any concept of a built-in container for dependency. You can use Browserify, Require JS, EcmaScript 6 modules which we can use via Babel to inject dependencies automatically.</li><li><strong><em>Testability</em></strong><br>ReactJS applications are super easy to test. React views can be treated as functions of the state, so we can manipulate with state we pass to the ReactJS view and take a look at the output and triggered actions, events, functions, etc.</li></ul><p>Hope you have enjoyed this article. In the next article, we will discuss about the life cycle of React js application. So, stay tuned for the next article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60c67c907bda" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>