<?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 Yajana Rao on Medium]]></title>
        <description><![CDATA[Stories by Yajana Rao on Medium]]></description>
        <link>https://medium.com/@yajanarao?source=rss-e83eb03cf0bd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*b4Lcm43kQHE3mhdKgcuj2w.jpeg</url>
            <title>Stories by Yajana Rao on Medium</title>
            <link>https://medium.com/@yajanarao?source=rss-e83eb03cf0bd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 01:46:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yajanarao/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[Data Flow Map using Cytoscape and Vue.js]]></title>
            <link>https://yajanarao.medium.com/create-a-data-flow-map-using-cytoscape-and-vue-js-5be3b3ef11d2?source=rss-e83eb03cf0bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/5be3b3ef11d2</guid>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[cytoscape]]></category>
            <category><![CDATA[dataflow]]></category>
            <category><![CDATA[charts]]></category>
            <category><![CDATA[network-graph]]></category>
            <dc:creator><![CDATA[Yajana Rao]]></dc:creator>
            <pubDate>Sun, 05 Dec 2021 16:44:36 GMT</pubDate>
            <atom:updated>2021-12-05T16:50:00.918Z</atom:updated>
            <content:encoded><![CDATA[<p>We are going to create a Data Flow Map using <a href="https://js.cytoscape.org/">Cytoscape</a> and <a href="https://github.com/cytoscape/cytoscape.js-dagre">Dagre</a> layout using Vue.js</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*pj-5ApJGvW5WnPrp4w10WA.png" /></figure><p>Link to the sandbox: <a href="https://codesandbox.io/s/github/YajanaRao/data-flow-map">https://codesandbox.io/s/github/YajanaRao/data-flow-map</a></p><p>Cytoscape is an <a href="https://cytoscape.org/download.html">open source</a> software platform for visualizing complex networks and integrating these with any type of attribute data.</p><p>In this blog we are going to create a Animal Classification flow chart.</p><h4>Nodes</h4><p>Below is the data sample of nodes of the data flow chart.</p><pre>const nodes = [{<br>  data: {<br>   id: 0,<br>   name: &quot;Animal&quot;,<br>   description: &quot;&quot;,<br>   active: true,<br>   width: 140,<br>  },<br> },<br> {<br>  data: {<br>   id: 1,<br>   name: &quot;Mammal&quot;,<br>   description: &quot;&quot;,<br>   active: false,<br>   width: 140,<br>  },<br> },<br> {<br>  data: {<br>   id: 2,<br>   name: &quot;Reptile&quot;,<br>   description: &quot;&quot;,<br>   active: false,<br>   width: 140,<br>  },<br> },<br> {<br>  data: {<br>   id: 3,<br>   name: &quot;Horse&quot;,<br>   description: &quot;&quot;,<br>   active: false,<br>   width: 140,<br>  },<br> },<br> {<br>  data: {<br>   id: 4,<br>   name: &quot;Dog&quot;,<br>   description: &quot;Join&quot;,<br>   active: false,<br>   width: 140,<br>  },<br> },<br> {<br>  data: {<br>   id: 5,<br>   name: &quot;Goat&quot;,<br>   description: &quot;Branch Out&quot;,<br>   active: false,<br>   width: 140,<br>  },<br> },<br> {<br>  data: {<br>   id: 6,<br>   name: &quot;Hound&quot;,<br>   description: &quot;&quot;,<br>   active: false,<br>   width: 140,<br>  },<br> },<br> {<br>  data: {<br>   id: 7,<br>   name: &quot;German Shephard&quot;,<br>   description: &quot;&quot;,<br>   active: false,<br>   width: 140,<br>  },<br> },<br>];</pre><p>Here active key represents active node of the chart which will be displayed in green box. width attribute is used to calculate the width of the node container based on the inner text length.</p><h4>Edges</h4><p>Edges are used to create the relationship between the nodes. source and target are used to relate between the nodes. id of nodes are used here in source and target properties.</p><pre>const edges = [<br>  { data: { source: 0, target: 1, label: &quot;Sub&quot; } },<br>  { data: { source: 0, target: 2, label: &quot;Sub&quot; } },<br>  { data: { source: 1, target: 3, label: &quot;Sub&quot; } },<br>  { data: { source: 1, target: 4, label: &quot;Sub&quot; } },<br>  { data: { source: 1, target: 5, label: &quot;Sub&quot; } },<br>  { data: { source: 4, target: 6, label: &quot;Sub&quot; } },<br>  { data: { source: 4, target: 7, label: &quot;Sub&quot; } },<br>];</pre><p>label is used as the text above the link between the nodes. It can be used to define the type of relation between the nodes.</p><h4>Chart</h4><p>Let’s create a method called drawGraph inside vuemethods . We initialize the dagre layout at the top followed by cytoscape configuration. node and edge selector is used to style each node and edge of the data. Inside layout dagre is configured.</p><pre>drawGraph() {<br>  cydagre(cytoscape);<br>  const cy = cytoscape({<br>    container: document.getElementById(&quot;cy&quot;),<br>    boxSelectionEnabled: false,<br>    autounselectify: true,<br>    style: cytoscape<br>      .stylesheet()<br>      .selector(&quot;node&quot;)<br>      .css({<br>        shape: &quot;roundrectangle&quot;,<br>        height: 40,<br>        width: &quot;data(width)&quot;,<br>        &quot;background-color&quot;: (node) =&gt;<br>          node.data(&quot;active&quot;) ? &quot;green&quot; : &quot;white&quot;,<br>        color: (node) =&gt; (node.data(&quot;active&quot;) ? &quot;white&quot; : &quot;black&quot;),<br>        &quot;border-color&quot;: &quot;gray&quot;,<br>        &quot;border-width&quot;: 3,<br>        &quot;border-radius&quot;: 4,<br>        content: &quot;data(name)&quot;,<br>        &quot;text-wrap&quot;: &quot;wrap&quot;,<br>        &quot;text-valign&quot;: &quot;center&quot;,<br>        &quot;text-halign&quot;: &quot;center&quot;,<br>      })<br>      .selector(&quot;edge&quot;)<br>      .css({<br>        // <a href="http://js.cytoscape.org/#style/labels">http://js.cytoscape.org/#style/labels</a><br>        label: &quot;data(label)&quot;, // maps to data.label<br>        &quot;text-outline-color&quot;: &quot;white&quot;,<br>        &quot;text-outline-width&quot;: 3,<br>        &quot;text-valign&quot;: &quot;top&quot;,<br>        &quot;text-halign&quot;: &quot;left&quot;,<br>        // <a href="https://js.cytoscape.org/demos/edge-types/">https://js.cytoscape.org/demos/edge-types/</a><br>        &quot;curve-style&quot;: &quot;bezier&quot;,<br>        width: 3,<br>        &quot;target-arrow-shape&quot;: &quot;triangle&quot;,<br>        &quot;line-color&quot;: &quot;gray&quot;,<br>        &quot;target-arrow-color&quot;: &quot;gray&quot;,<br>      }),<br>    elements: {<br>      nodes: nodes,<br>      edges: edges,<br>    },<br>    layout: {<br>      name: &quot;dagre&quot;,<br>      spacingFactor: 1.5,<br>      rankDir: &quot;LR&quot;,<br>      fit: true,<br>    },<br>  });<br>},</pre><p>Complete source code is available in the github repository: <a href="https://github.com/YajanaRao/data-flow-map">https://github.com/YajanaRao/data-flow-map</a></p><p>Link to the codesandbox: <a href="https://codesandbox.io/s/github/YajanaRao/data-flow-map">https://codesandbox.io/s/github/YajanaRao/data-flow-map</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5be3b3ef11d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create a Basic Authentication App using React Query and React Navigation]]></title>
            <link>https://yajanarao.medium.com/how-to-create-a-basic-authentication-app-using-react-query-and-react-navigation-1c755269d031?source=rss-e83eb03cf0bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c755269d031</guid>
            <category><![CDATA[react-native-app]]></category>
            <category><![CDATA[react-query]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[react-navigation]]></category>
            <category><![CDATA[basic-authentication]]></category>
            <dc:creator><![CDATA[Yajana Rao]]></dc:creator>
            <pubDate>Sun, 21 Nov 2021 17:38:19 GMT</pubDate>
            <atom:updated>2021-11-21T17:38:46.553Z</atom:updated>
            <content:encoded><![CDATA[<p>In this tutorial we will see how to create a basic authentication app using react navigation 6 and react query. Requests to the server, validation and navigation flow is handled in this application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IwoVIfCNNWBYY8aM" /><figcaption>Photo by <a href="https://unsplash.com/@casparrubin?utm_source=medium&amp;utm_medium=referral">Caspar Camille Rubin</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>We are using <a href="https://docs.expo.dev/get-started/create-a-new-app/">expo</a> app for this tutorial. Create a blank expo application by executing the below command.</p><pre>expo init BasicAuthApp # select blank template app<br>cd BasicAuthApp<br>npm start</pre><h4>Install React Navigation</h4><pre>npm install @react-navigation/native @react-navigation/native-stack</pre><p>Installing dependencies into an Expo managed project​</p><pre>expo install react-native-screens react-native-safe-area-context</pre><h4>Install React Query for Data fetching</h4><pre>npm i react-query</pre><h4>Application setup</h4><p>Open App.js and setup react-query and react-navigation</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/08aad0f4d502171cb048f987a2d10fa8/href">https://medium.com/media/08aad0f4d502171cb048f987a2d10fa8/href</a></iframe><p>Two stack navigators are created to handle authenticated and non authenticated screens so that we can’t navigate to authentication screens after login via back button and restrict access to non authorized users.</p><h4>Register Screen</h4><p>Using react-query we will handle the basic authentications. <a href="https://react-query.tanstack.com/guides/mutations">useMutation</a> hook is used to do the register the new user.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1adbf480b5a6a16d9814de92ba35d061/href">https://medium.com/media/1adbf480b5a6a16d9814de92ba35d061/href</a></iframe><h4>Login Screen</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5b510c9a6badf51890b70caf63557ebc/href">https://medium.com/media/5b510c9a6badf51890b70caf63557ebc/href</a></iframe><h4>Create a file for handling requests to servers</h4><p>service.js</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a607a63cf26c6ebfaba37170708a79f1/href">https://medium.com/media/a607a63cf26c6ebfaba37170708a79f1/href</a></iframe><p>With this create screens for <a href="https://github.com/YajanaRao/BasicAuthApp/blob/main/src/screens/Home.js">HomeScreen.js</a> and <a href="https://github.com/YajanaRao/BasicAuthApp/blob/main/src/screens/Details.js">DetailScreen.js</a> which will be a part of authenticated stack.</p><p>Link to the repository: <a href="https://github.com/YajanaRao/BasicAuthApp">https://github.com/YajanaRao/BasicAuthApp</a></p><h4>References:</h4><ul><li><a href="https://react-query.tanstack.com/overview">https://react-query.tanstack.com/overview</a></li><li><a href="https://reactnavigation.org/docs/hello-react-navigation">https://reactnavigation.org/docs/hello-react-navigation</a></li><li><a href="https://reactnative.dev/docs/environment-setup">https://reactnative.dev/docs/environment-setup</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c755269d031" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best Coding Practices]]></title>
            <link>https://yajanarao.medium.com/best-coding-practices-9863df56aa42?source=rss-e83eb03cf0bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/9863df56aa42</guid>
            <category><![CDATA[solid-principles]]></category>
            <category><![CDATA[keep-it-simple-stupid]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[code-editor]]></category>
            <category><![CDATA[best-practices]]></category>
            <dc:creator><![CDATA[Yajana Rao]]></dc:creator>
            <pubDate>Sun, 07 Nov 2021 15:48:01 GMT</pubDate>
            <atom:updated>2021-11-09T17:06:31.017Z</atom:updated>
            <content:encoded><![CDATA[<p>Collection of tips and tricks to write better code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*By-9FWUDN2BJxmaZ" /><figcaption>Photo by <a href="https://unsplash.com/@clark_fransa?utm_source=medium&amp;utm_medium=referral">Arnold Francisca</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>1. Be consistence with your editor</h3><p>It might be your IDE or code editor, Please don’t change them often. Code editors or IDE’s has there own key bindings, themes and functionality which takes a while for to get comfortable with.</p><h4>Make some space for your code</h4><p>Remove unwanted distractions apart from code from the editor space</p><h4>Know your editor well.</h4><p>Understand the shortcuts for navigation and text input. It improves your performance</p><h3>2. Create a wrapper around external libraries before using</h3><p>In case if you want to replace the library, You don’t need to change every where if you have a wrapper created around it.</p><h3>3. Understand SOLID design principle</h3><p>SOLID is a popular set of design principles that are used in object-oriented software development. SOLID is an acronym that stands for five key design principles:</p><ul><li><strong>Single responsibility principle</strong></li></ul><p>A class should have one, and only one, reason to change.</p><ul><li><strong>Open-closed principle</strong></li></ul><p>You should be able to extend a class’s behavior without modifying it. Or simply open for extension and closed for modification.</p><ul><li><strong>Liskov substitution principle</strong></li></ul><p>The principle simply requires that every derived class should be substitutable for its parent class.</p><p>What is wanted here is something like the following substitution property: if for each object O1 of type S there is an object O2 of type T such that for all programs P defined in terms of T, the behavior of P is unchanged when O1 is substituted for O2 then S is a subtype of T.</p><ul><li><strong>Interface segregation principle</strong></li></ul><p>The general idea of interface segregation principle is that it’s better to have a lot of smaller interfaces than a few bigger ones. Martin explains this principle by advising, “Make fine grained interfaces that are client-specific. Clients should not be forced to implement interfaces they do not use.”</p><ul><li><strong>Dependency inversion principle</strong></li></ul><p>Developer should depend on abstractions, not on concretions. high level modules should not depend upon low level modules. Both should depend on abstractions. abstractions should not depend on details. Details should depend upon abstractions.</p><h3>4. DRY ( Don’t repeat yourself )</h3><p>The DRY Principle states that “Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.” This is also sometimes known as DIE: Duplication Is Evil.</p><p>Simply stated, the same piece of code should never be repeated over and over.</p><h3>5. WET ( Write everything twice )</h3><blockquote>You can ask yourself “Haven’t I written this before?” two times, but never three.</blockquote><p>The goal is to make sure that a class with the same logic has been <strong><em>independently</em></strong> written for at least 2 separate products before you can think about extracting it into a reusable component for a component library. This way our reusable components will be more mature, more stable, have generalized parameters/names/internals, with significantly reduced need for a potentially breaking refactoring.</p><h3>6. AHA ( Avoid hasty abstractions )</h3><blockquote>prefer duplication over the wrong abstraction</blockquote><p>AHA stands for “Avoid Hasty Abstractions”, described by Kent C. Dodds as optimizing for change first, and avoiding premature optimization. AHA programming assumes that both WET and DRY solutions inevitably create software that is rigid and difficult to maintain. Instead of starting with an abstraction, or abstracting at a specific number of duplications, software can be more flexible and robust if abstraction is done when it is needed, or, when the duplication itself has become the barrier and it is known how the abstraction needs to function.</p><h3>7. Keep it simple</h3><p>Just as one of the coding best practices is to keep your code readable, you should also strive to keep it simple. Complex code means the likelihood of more bugs and more mistakes.</p><h4><strong>References</strong>:</h4><ul><li><a href="https://web.archive.org/web/20150906155800/http:/www.objectmentor.com/resources/articles/Principles_and_Patterns.pdf">https://web.archive.org/web/20150906155800/http:/www.objectmentor.com/resources/articles/Principles_and_Patterns.pdf</a></li><li><a href="https://youtu.be/agkWYPUcLpg">https://youtu.be/agkWYPUcLpg</a></li><li><a href="https://kentcdodds.com/blog/aha-programming">https://kentcdodds.com/blog/aha-programming</a></li><li><a href="https://sandimetz.com/blog/2016/1/20/the-wrong-abstraction">https://sandimetz.com/blog/2016/1/20/the-wrong-abstraction</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9863df56aa42" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API documentation using Swagger]]></title>
            <link>https://yajanarao.medium.com/api-documentation-using-swagger-cd6e02176aec?source=rss-e83eb03cf0bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd6e02176aec</guid>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[swagger-ui]]></category>
            <category><![CDATA[swagger]]></category>
            <category><![CDATA[yaml]]></category>
            <category><![CDATA[open-api]]></category>
            <dc:creator><![CDATA[Yajana Rao]]></dc:creator>
            <pubDate>Mon, 11 Oct 2021 15:44:20 GMT</pubDate>
            <atom:updated>2021-10-12T16:21:32.791Z</atom:updated>
            <content:encoded><![CDATA[<h3>What Is API Documentation?</h3><p>API documentation is technical content that documents the API. It includes instructions on how to effectively use and integrate the API. It also provides updates on the API’s lifecycle such as new versions or retirement. Some aspects of API documentation can be generated automatically via Swagger or other documents.</p><h3>Let’s start with clarifying Swagger vs OpenAPI</h3><p>The easiest way to understand the difference is:</p><ul><li>OpenAPI = Specification</li><li>Swagger = Tools for implementing the specification</li></ul><p>OpenAPI Specification (formerly known as Swagger Specification) is an open-source format for describing and documenting APIs.</p><p>The Specification was originally developed in 2010 by Reverb Technologies (formerly Wordnik) as a way to keep the API design and documentation in sync.</p><p>The latest version of OpenAPI is 3.0. OpenAPI definitions can be written in JSON or YAML. We recommend YAML, because it is easier to read and write.</p><h3>Prerequisites</h3><ul><li>Basic knowledge of RESTful APIs.</li><li>Basic knowledge of YAML is recommended.</li></ul><h3>Create an API</h3><p>An API defined using the OpenAPI Specification can be divided into 3 main sections –</p><ol><li><strong>Meta information</strong></li><li><strong>Path items (endpoints):</strong></li></ol><ul><li>Parameters</li><li>Request bodies</li><li>Responses</li></ul><p><strong>3. Reusable components:</strong></p><ul><li>Schemas (data models)</li><li>Parameters</li><li>Responses</li><li>Other components</li></ul><h3>Meta information</h3><p>Let’s start with a simple API definition that contains just meta information, such as the API title, version, server URL and other descriptive information.</p><blockquote><em>All keyword names are case-sensitive.</em></blockquote><pre>openapi: 3.0.0<br>info:<br>  version: 1.0.0<br>  title: Simple Artist API<br>  description: A simple API to illustrate OpenAPI concepts</pre><pre>servers:<br>  - url: <a href="https://example.io/v1">https://example.io/v1</a></pre><pre># Basic authentication<br>components:<br>  securitySchemes:<br>    BasicAuth:<br>      type: http<br>      scheme: basic<br>security:<br>  - BasicAuth: []</pre><pre>paths: {}</pre><h3>Info</h3><p>Each API definition starts with the version of the OpenAPI Specification that this definition uses. In our example, it is openapi: 3.0.0. The info object contains the API title and version, which are required, and an optional description.</p><h3>Servers</h3><p>The servers array specifies one or more server URLs for API calls. The API endpoint paths are appended to the server URL. Some APIs have a single server, others may have multiple servers, such as production, staging and sandbox. In our example, the server URL is <a href="https://example.io/v1">https://example.io/v1</a>.</p><h3>Security</h3><p>We also secure the API using Basic authentication, so that only authorized users can consume the API.</p><p>Supported authentication methods are:</p><ul><li>HTTP authentication: Basic, Bearer, and so on.</li><li>API key as a header or query parameter or in cookies</li><li>OAuth 2</li><li>OpenID Connect Discovery</li></ul><h3>Path</h3><p>The path items are the endpoints of your API under which you can specify HTTP verbs for manipulating the resources in the desired manner. These endpoints are relative to the server URL, which in our example is <a href="https://example.io/v1.">https://example.io/v1.</a></p><p>We will define the /artists endpoint and the GET method for this endpoint. So, a client will use GET https://example.io/v1/artists to get a list of artists.</p><pre>openapi: 3.0.0<br>info:<br>  version: 1.0.0<br>  title: Simple API<br>  description: A simple API to illustrate OpenAPI concepts</pre><pre>servers:<br>  - url: <a href="https://example.io/v1">https://example.io/v1</a></pre><pre>components:<br>  securitySchemes:<br>    BasicAuth:<br>      type: http<br>      scheme: basic<br>security:<br>  - BasicAuth: []</pre><pre>#  ----- Added lines  ----------------------------------------<br>paths:<br>  /artists:<br>    get:<br>      description: Returns a list of artists<br>#  ---- /Added lines  ----------------------------------------</pre><h3>Responses</h3><p>Every response would need at least one HTTP status code to describe the kind of responses a consumer is likely to expect. The description gives details on what the responses of the API would be. In our sample code, we have specified 200, which is a successful client request, while 400 is an unsuccessful request.</p><pre>openapi: 3.0.0<br>info:<br>  version: 1.0.0<br>  title: Simple API<br>  description: A simple API to illustrate OpenAPI concepts</pre><pre>servers:<br>  - url: <a href="https://example.io/v1">https://example.io/v1</a></pre><pre>components:<br>  securitySchemes:<br>    BasicAuth:<br>      type: http<br>      scheme: basic<br>security:<br>  - BasicAuth: []</pre><pre>paths:<br>  /artists:<br>    get:<br>      description: Returns a list of artists<br>      #  ----- Added lines  ----------------------------------------<br>      responses:<br>        &quot;200&quot;:<br>          description: Successfully returned a list of artists<br>          content:<br>            application/json:<br>              schema:<br>                type: array<br>                items:<br>                  type: object<br>                  required:<br>                    - username<br>                  properties:<br>                    artist_name:<br>                      type: string<br>                    artist_genre:<br>                      type: string<br>                    albums_recorded:<br>                      type: integer<br>                    username:<br>                      type: string</pre><pre>        &quot;400&quot;:<br>          description: Invalid request<br>          content:<br>            application/json:<br>              schema:<br>                type: object<br>                properties:<br>                  message:<br>                    type: string<br>      #  ---- /Added lines  ----------------------------------------</pre><h3>Parameters</h3><p>Operations can have parameters passed via URL path (/users/{userId}), query string (/users?role=admin), headers (X-CustomHeader: Value) or cookies (Cookie: debug=0). You can define the parameter data types, format, whether they are required or optional, and other details:</p><h4>Query parameters</h4><p>Query parameters appear at the end of a URL following a question mark. Query parameters are optional and non unique, so they can be specified multiple times in the URL. It is a non-hierarchical component of the URL.</p><pre>GET <a href="https://example.io/v1/artists?limit=20&amp;offset=3">https://example.io/v1/artists?limit=20&amp;offset=3</a></pre><h4>Request body</h4><p>POST, PUT and PATCH requests typically contain the request body. The request body is defined by using the requestBody object. For this API, let’s add the ability for a user to post an artist to our database. This would be under the /artists resource.</p><h4>Path parameters</h4><p>The path parameters can be used to isolate a specific component of the data that the client is working with, for example, https://example.io/v1/artists/{username}. Path parameters are part of the hierarchical component of the URL, and are thus stacked sequentially.</p><h3>Reusable components</h3><p>The Specification defines various types of reusable components:</p><ul><li>Schemas (data models)</li><li>Parameters</li><li>Request bodies</li><li>Responses</li><li>Response headers</li><li>Examples</li><li>Links</li><li>Callbacks</li></ul><h3>References:</h3><ul><li><a href="https://support.smartbear.com/swaggerhub/docs/tutorials/openapi-3-tutorial.html">https://support.smartbear.com/swaggerhub/docs/tutorials/openapi-3-tutorial.html</a></li><li><a href="https://swagger.io/specification/">https://swagger.io/specification/</a></li><li><a href="https://swagger.io/docs/specification/basic-structure/">https://swagger.io/docs/specification/basic-structure/</a></li><li><a href="https://commonmark.org/help/">https://commonmark.org/help/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd6e02176aec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to crate a Calendar App in React Native using Pure JavaScript/Typescript and without any…]]></title>
            <link>https://yajanarao.medium.com/how-to-crate-a-calendar-app-in-react-native-using-pure-javascript-and-without-any-external-2680b5c806b3?source=rss-e83eb03cf0bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/2680b5c806b3</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[calendar]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Yajana Rao]]></dc:creator>
            <pubDate>Sun, 26 Sep 2021 07:55:01 GMT</pubDate>
            <atom:updated>2021-09-26T07:55:26.050Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to crate a Calendar App in React Native using Pure JavaScript/Typescript and without any External Libraries</h3><p>We are going to create a calendar application without using any external libraries just using Typescript.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*eN4wpwdcqA2nfdm6JuUY1w.gif" /></figure><p>Pre requisite: Make sure to have a <a href="https://reactnative.dev/docs/environment-setup">react native development environment</a>.</p><p>Let’s start by creating a react native application</p><pre>npx react-native init CalendarApp --template react-native-template-typescript</pre><pre>cd CalendarApp</pre><p>Let’s start by creating a const.ts file for storing all the constants related to Calendar component</p><pre>// src/components/Calendar/consts.ts<br>export const months = [&quot;January&quot;, &quot;February&quot;, &quot;March&quot;, &quot;April&quot;, <br>&quot;May&quot;, &quot;June&quot;, &quot;July&quot;, &quot;August&quot;, &quot;September&quot;, &quot;October&quot;, <br>&quot;November&quot;, &quot;December&quot;];<br> <br>export const weekDays = [<br>    &quot;Sun&quot;,&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&quot;Thu&quot;,&quot;Fri&quot;,&quot;Sat&quot;<br>];<br><br>export const daysInEachMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];</pre><p>We need to create a two dimensional array containing days and date in the calendar format. For that let’s create a function called generateMatrix which handles this logic.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f04eeca62ba56ac6824c76c5ffe2d42d/href">https://medium.com/media/f04eeca62ba56ac6824c76c5ffe2d42d/href</a></iframe><p>Let’s create a Calendar component called Calendar.tsx Inside the src/compoents/Calender folder</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/38f8dacf97d70f04d191b6dad45729ee/href">https://medium.com/media/38f8dacf97d70f04d191b6dad45729ee/href</a></iframe><p>Let’s import the component in App.tsx and implement functionalities like jump to the date in the file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/83facba97d663c661dbf138449242564/href">https://medium.com/media/83facba97d663c661dbf138449242564/href</a></iframe><h3>References:</h3><p>Link to the Snack: <a href="https://snack.expo.dev/@yajana/calendarapp">https://snack.expo.dev/@yajana/calendarapp</a></p><p>Link to the GitHub repo: <a href="https://github.com/YajanaRao/CalendarApp">https://github.com/YajanaRao/CalendarApp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2680b5c806b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create a Sticky Header in React Native and React Navigation]]></title>
            <link>https://yajanarao.medium.com/how-to-create-a-sticky-header-in-react-native-and-react-navigation-4a48f015b731?source=rss-e83eb03cf0bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a48f015b731</guid>
            <category><![CDATA[react-navigation]]></category>
            <category><![CDATA[stickyheader]]></category>
            <category><![CDATA[animation]]></category>
            <category><![CDATA[collapsing-toolbar]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Yajana Rao]]></dc:creator>
            <pubDate>Sun, 05 Sep 2021 16:56:38 GMT</pubDate>
            <atom:updated>2021-09-05T16:57:24.414Z</atom:updated>
            <content:encoded><![CDATA[<p>We will use react-navigation-collapsible to make react navigation header collapsible. The use case that we are trying to replicate is sometime similar to Spotify search page UI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*hW0LUJUCPLVwt-KrJ7Cx7Q.gif" /></figure><p>We will use react-native-collapsible <a href="https://github.com/benevbright/react-navigation-collapsible/blob/main/example/src/StickyHeaderScreen.tsx">sticky header</a> to get the desired effect of the header.</p><p>Let us start by creating Search screen</p><h4><strong>Setup</strong></h4><p>Install required packages using yarn or npm</p><pre>npm install react-navigation-collapsible</pre><h4><strong>SearchScreen.tsx</strong></h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/30ead41908e3e63d40fea23c6d9b86ab/href">https://medium.com/media/30ead41908e3e63d40fea23c6d9b86ab/href</a></iframe><h4><strong>Create App.js</strong></h4><p>Wrap the root component with NavigationContainer and make sure to include SearchScreen inside a navigation stack.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6adfb4902e6969682f3f5370010f96c9/href">https://medium.com/media/6adfb4902e6969682f3f5370010f96c9/href</a></iframe><p>The resulting application should display sticky header.</p><h4><strong>References:</strong></h4><p>Link to the sample project: <a href="https://github.com/YajanaRao/Serenity/blob/develop/packages/mobile/src/screens/search/Search.tsx">Serenity Music Player</a></p><p>Link to the library: <a href="https://github.com/benevbright/react-navigation-collapsible">https://github.com/benevbright/react-navigation-collapsible</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a48f015b731" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to build Responsive React Native Components using Restyle]]></title>
            <link>https://yajanarao.medium.com/how-to-build-responsive-components-using-restyle-7eb2742538a5?source=rss-e83eb03cf0bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/7eb2742538a5</guid>
            <category><![CDATA[responsive-design]]></category>
            <category><![CDATA[re-style]]></category>
            <category><![CDATA[responsive]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[react-native-web]]></category>
            <dc:creator><![CDATA[Yajana Rao]]></dc:creator>
            <pubDate>Sun, 22 Aug 2021 10:54:54 GMT</pubDate>
            <atom:updated>2021-08-22T11:03:42.138Z</atom:updated>
            <content:encoded><![CDATA[<p>In this blog I will show you how to build a responsive react native components using Restyle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CSjAyYK8cK0T2amo2gCyQQ.png" /></figure><p>The Restyle library provides a type-enforced system for building UI components in React Native with TypeScript. It’s a library for building UI libraries, with themability as the core focus.</p><h4>Installation</h4><p>Yarn</p><pre>$ yarn add @shopify/restyle</pre><p>NPM</p><pre>$ npm install @shopify/restyle</pre><h4>Define Theme</h4><p>Let’s create a global theme object. It should contain values for spacing, colors, breakpoints and more.</p><p>Below is an example of how a basic theme could look.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/843617e47134de41177688e8914fec3c/href">https://medium.com/media/843617e47134de41177688e8914fec3c/href</a></iframe><h4>Access theme</h4><p>This theme should be passed to a ThemeProvider at the top of your React component tree:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/81b26aa6db874b1b828bc227ad8175ee/href">https://medium.com/media/81b26aa6db874b1b828bc227ad8175ee/href</a></iframe><p>Here Box and Text are <a href="http://Breakpoints are defined as minimum widths (inclusive) for different target screen sizes where we want to apply differing styles. Consider giving your breakpoints names that give a general idea of the type of device the user is using. Breakpoints can be defined by either a single value (width) or an object containing both width and height:"><em>predefined components</em></a> from restyle</p><h4>Creating responsive components</h4><p>Using <a href="http://Breakpoints are defined as minimum widths (inclusive) for different target screen sizes where we want to apply differing styles. Consider giving your breakpoints names that give a general idea of the type of device the user is using. Breakpoints can be defined by either a single value (width) or an object containing both width and height:"><em>breakpoints</em></a> we can specify different styles for different screen sizes.</p><p>Let’s create a card example with acts as list on wide screen devices.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/27a17100801b348aa2f2aed01c14ba12/href">https://medium.com/media/27a17100801b348aa2f2aed01c14ba12/href</a></iframe><p>Define the different values of flex direction for different screen sizes.</p><pre>flexDirection={{ phone: ‘column’, tablet: ‘row’ }}</pre><p>For more details visit <a href="https://github.com/Shopify/restyle#breakpoints"><em>restyle documentation</em></a></p><h4>Reference:</h4><p><a href="https://snack.expo.dev/@yajana/restyle">ReStyle - Snack</a></p><p><a href="https://github.com/Shopify/restyle">https://github.com/Shopify/restyle</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7eb2742538a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Debug Redux in React Native using Flipper]]></title>
            <link>https://javascript.plainenglish.io/how-to-debug-redux-in-react-native-using-flipper-d785b46cf7bf?source=rss-e83eb03cf0bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/d785b46cf7bf</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Yajana Rao]]></dc:creator>
            <pubDate>Sun, 15 Aug 2021 07:10:31 GMT</pubDate>
            <atom:updated>2024-08-19T10:26:18.578Z</atom:updated>
            <content:encoded><![CDATA[<p>The <a href="https://classic.yarnpkg.com/en/package/flipper-plugin-redux-debugger">flipper-plugin-redux-debugger</a> allows you to read React Native redux logs inside <a href="https://fbflipper.com/">Flipper</a> now:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zci4wV7eHmxYsr5ebUQfvA.png" /><figcaption>redux-flipper</figcaption></figure><h4>Install required packages</h4><p>Install <a href="https://github.com/jk-gan/redux-flipper">redux-flipper</a> middleware and react-native-flipper in your React Native app:</p><pre>yarn add --dev redux-flipper react-native-flipper</pre><p>or</p><pre>npm i --save-dev redux-flipper react-native-flipper</pre><h4>Update pods for ios</h4><p>Install pods for React Native flipper in iOS:</p><p>npx pod-install or cd ios &amp;&amp; pod install</p><h4>Configure redux store</h4><p>Add the middleware into your redux store:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dd04038803952e10d04edbb6bcb3523d/href">https://medium.com/media/dd04038803952e10d04edbb6bcb3523d/href</a></iframe><p>In case if you are using Redux toolkit:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/51d86ae9941c78d00d62ad44fe96c069/href">https://medium.com/media/51d86ae9941c78d00d62ad44fe96c069/href</a></iframe><blockquote><em>💡</em> <strong>Learn about the server-driven UI approach in React Native:</strong></blockquote><p><a href="https://differ.blog/p/exploring-the-power-of-server-driven-ui-in-react-native-b21249">Exploring the Power of Server-Driven UI in React Native</a></p><blockquote><em>👉</em> To read more such acrticles, <a href="https://differ.blog/"><strong>sign up for free on Differ</strong></a>.</blockquote><h4>Install Redux debugger plugin</h4><p>Open Flipper desktop client and install redux-debugger plugin</p><ol><li>Plugin Manager &gt; Install Plugins &gt; search &quot;redux-debugger&quot; &gt; Install redux-debugger</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*xmU-0mAmfBvkMbVNKlVdrg.gif" /></figure><h4>Enable redux debugger</h4><p>The redux-debugger plugin will be listed in the disabled plugin section. Enable the plugin to get started.</p><pre>Disabled &gt; Redux Debugger &gt; Enable Plugin</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*HIXzvdYYHmSKfAac72-Heg.gif" /></figure><h4>Start the app to see the logs in Redux debugger</h4><p>yarn android and yarn start</p><p><strong>NOTE</strong>: Click on action to see the state</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tXVljblKZ1LJwzvjP6x81Q.png" /></figure><h3>In Plain English 🚀</h3><p><em>Thank you for being a part of the </em><a href="https://plainenglish.io/"><strong><em>In Plain English</em></strong></a><em> community! Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://twitter.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong>YouTube</strong></a> | <a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a></li><li>Visit our other platforms: <a href="https://cofeed.app/"><strong>CoFeed</strong></a> | <a href="https://differ.blog/"><strong>Differ</strong></a></li><li>More content at <a href="https://plainenglish.io/"><strong>PlainEnglish.io</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d785b46cf7bf" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/how-to-debug-redux-in-react-native-using-flipper-d785b46cf7bf">How to Debug Redux in React Native using Flipper</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create Custom MapView Component in React Native Gifted Chat]]></title>
            <link>https://yajanarao.medium.com/how-to-create-custom-mapview-component-in-react-native-gifted-chat-51c2b485bf98?source=rss-e83eb03cf0bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/51c2b485bf98</guid>
            <category><![CDATA[gifted-chat]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[ract-native-chat]]></category>
            <category><![CDATA[react-native-maps]]></category>
            <category><![CDATA[react-native-gifted-chat]]></category>
            <dc:creator><![CDATA[Yajana Rao]]></dc:creator>
            <pubDate>Sun, 08 Aug 2021 07:05:48 GMT</pubDate>
            <atom:updated>2021-08-08T07:05:48.910Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eNVnZl3wvFygxMBzNVThnw.png" /></figure><p><a href="https://github.com/FaridSafi/react-native-gifted-chat">React Native Gifted Chat </a>is a feature rich chat UI for React Native &amp; Web. I would like to show you, how to create a custom view for gifted chat component. We will build a map view component for the react native gifted chat. When there is location property in the chat, we will display react native maps MapView instead of default chat bubble.</p><p>Link to the Working Expo Snack is attached at the bottom of the article.</p><p>I have tried to explain the same in this video as well.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FXPM7hkEoOOw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DXPM7hkEoOOw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FXPM7hkEoOOw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/08ddf998712df35364c572d0ad2efdda/href">https://medium.com/media/08ddf998712df35364c572d0ad2efdda/href</a></iframe><p>If you have not yet installed go ahead and install react native gifted chat</p><p>yarn add react-native-gifted-chat or npm i react-native-gifted-chat</p><p>We also need react native maps for displaying maps. Install react native maps into the application.</p><p>yarn add react-native-maps -E or npm i react-native-maps</p><p>Add a gifted chat component to the application</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dda8c49b88b8da53cb924692f19dc64a/href">https://medium.com/media/dda8c49b88b8da53cb924692f19dc64a/href</a></iframe><p>We need to implement renderBubble<em> </em>function to check for location coordinates in the message object and display MapView in case of coordinates.</p><pre>const renderBubble = (props) =&gt; {<br>  const { currentMessage } = props;<br>  if (currentMessage.location) {<br>    return &lt;LocationView location={currentMessage.location} /&gt;;<br>  }<br>  return &lt;Bubble {...props} /&gt;;<br>};</pre><p>Wrapping the MapView with TouchableOpacity will help to open the coordinates in the respective map application based on Platform on click.</p><pre>const openMaps = () =&gt; {<br>    const url = Platform.select({<br>      ios: `<a href="http://maps.apple.com/?ll=${location.latitude},${location.longitude}`">http://maps.apple.com/?ll=${location.latitude},${location.longitude}`</a>,<br>      android: `<a href="http://maps.google.com/?q=${location.latitude},${location.longitude}`">http://maps.google.com/?q=${location.latitude},${location.longitude}`</a>,<br>    });<br>    Linking.canOpenURL(url)<br>      .then((supported) =&gt; {<br>        if (supported) {<br>          return Linking.openURL(url);<br>        }<br>      })<br>      .catch((err) =&gt; {<br>        console.error(&quot;An error occurred&quot;, err);<br>      });<br>  };</pre><h4>Link to Expo Snack:</h4><p><a href="https://snack.expo.io/@yajana/custom-view-in-gifted-chat">https://snack.expo.io/@yajana/custom-view-in-gifted-chat</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51c2b485bf98" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use Why Did You Render library in React Native]]></title>
            <link>https://yajanarao.medium.com/how-to-use-why-did-you-render-library-in-react-native-a95121978a75?source=rss-e83eb03cf0bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/a95121978a75</guid>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[why-did-you-render]]></category>
            <category><![CDATA[optimization]]></category>
            <dc:creator><![CDATA[Yajana Rao]]></dc:creator>
            <pubDate>Sun, 08 Aug 2021 06:50:13 GMT</pubDate>
            <atom:updated>2021-08-08T07:06:47.101Z</atom:updated>
            <content:encoded><![CDATA[<p><em>why-did-you-render</em> can be used to detect unnecessary re renders in react native.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WhR0GNM_wrfEawQ4HfU2ZQ.jpeg" /></figure><h3>Setup</h3><p>Install <a href="https://github.com/welldone-software/why-did-you-render">why-did-you-render</a> package for your react native project</p><p><strong>Using Npm</strong></p><pre>npm install @welldone-software/why-did-you-render --save-dev</pre><p><strong>Using Yarn:</strong></p><pre>yarn add --dev <a href="http://twitter.com/welldone">@welldone</a>-software/why-did-you-render</pre><p>Create wdyr.js file in root directory of your project</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cafffed6f17de7d4289b63e4715322e8/href">https://medium.com/media/cafffed6f17de7d4289b63e4715322e8/href</a></iframe><p>Setting flag trackAllPureComponents will enable logging for all pure components.</p><p>You can track a component by setting whyDidYouRender to true</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*4evAFZ5JpCQco3iibdkeXQ.png" /></figure><p>Import wdyr as the first import in index.js</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*-LIu6rbQpiJvMbpj8C8RXA.png" /></figure><p>Run the application and you should be able to see the logs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*nA3n6X_jp8CuSoDywDCLhg.png" /></figure><h4>References:</h4><p>On Expo Snack you might have some issue, Please refer this link for some information: <a href="https://github.com/welldone-software/why-did-you-render/issues/58">https://github.com/welldone-software/why-did-you-render/issues/58</a></p><p>Link to github repo: <a href="https://github.com/welldone-software/why-did-you-render">https://github.com/welldone-software/why-did-you-render</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a95121978a75" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>