<?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 Murali Chepuri on Medium]]></title>
        <description><![CDATA[Stories by Murali Chepuri on Medium]]></description>
        <link>https://medium.com/@murali.chepuri?source=rss-e5b3a54794eb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ZPqK0IvC5QayEIcQ9-EwPQ.jpeg</url>
            <title>Stories by Murali Chepuri on Medium</title>
            <link>https://medium.com/@murali.chepuri?source=rss-e5b3a54794eb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 16:47:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@murali.chepuri/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[Have You Checked the Bill After Your First Claude PR Review?]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@murali.chepuri/have-you-checked-the-bill-after-your-first-claude-pr-review-2b9740f6b089?source=rss-e5b3a54794eb------2"><img src="https://cdn-images-1.medium.com/max/1408/1*x9RfSKLKsqNArKASEf3WCQ.png" width="1408"></a></p><p class="medium-feed-snippet"># I Built Claude into My PR Review Pipeline. Here&#x2019;s How I Cut the Cost by 90%.</p><p class="medium-feed-link"><a href="https://medium.com/@murali.chepuri/have-you-checked-the-bill-after-your-first-claude-pr-review-2b9740f6b089?source=rss-e5b3a54794eb------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@murali.chepuri/have-you-checked-the-bill-after-your-first-claude-pr-review-2b9740f6b089?source=rss-e5b3a54794eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b9740f6b089</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[claude]]></category>
            <dc:creator><![CDATA[Murali Chepuri]]></dc:creator>
            <pubDate>Wed, 17 Jun 2026 16:25:23 GMT</pubDate>
            <atom:updated>2026-06-17T16:44:19.437Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Linear Regression in Action: Coding It Up with Python]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@murali.chepuri/linear-regression-in-action-coding-it-up-with-python-76f9a257a638?source=rss-e5b3a54794eb------2"><img src="https://cdn-images-1.medium.com/max/1024/0*7y9AG_HDknByjXWZ" width="1024"></a></p><p class="medium-feed-snippet">In my previous article, we walked through the concepts of linear regression with a super-simple dataset.</p><p class="medium-feed-link"><a href="https://medium.com/@murali.chepuri/linear-regression-in-action-coding-it-up-with-python-76f9a257a638?source=rss-e5b3a54794eb------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@murali.chepuri/linear-regression-in-action-coding-it-up-with-python-76f9a257a638?source=rss-e5b3a54794eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/76f9a257a638</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[machine-learning-ai]]></category>
            <category><![CDATA[linear-regression]]></category>
            <dc:creator><![CDATA[Murali Chepuri]]></dc:creator>
            <pubDate>Sat, 06 Sep 2025 22:43:34 GMT</pubDate>
            <atom:updated>2025-09-06T22:43:34.588Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Linear Regression Made Simple: A Beginner’s Guide with a Tiny Dataset]]></title>
            <link>https://medium.com/@murali.chepuri/linear-regression-made-simple-a-beginners-guide-with-a-tiny-dataset-52755d343359?source=rss-e5b3a54794eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/52755d343359</guid>
            <category><![CDATA[machine-learning-ai]]></category>
            <category><![CDATA[linear-regression]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Murali Chepuri]]></dc:creator>
            <pubDate>Sat, 06 Sep 2025 21:04:21 GMT</pubDate>
            <atom:updated>2025-09-06T21:47:27.406Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever searched for a <strong>simple explanation of Linear Regression</strong> and felt lost in big data sets and jargon? Don’t worry — you’re not alone. In this post, I’ll walk you through the <strong>core idea</strong> behind Linear Regression using the smallest possible dataset, with the main math involved behind.</p><h3>A Super-Simple Dataset</h3><p>Imagine we have a dataset with just two columns, X and y:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ARG-BYTxDenRhex2lOlKKQ.png" /></figure><p>Now, here’s a quick test:</p><p>👉 If X=5, what would y be?</p><p>If you answered <strong>25</strong>, you nailed it! 🎯</p><p>This happens because the pattern here is quadratic (y = X²). But what if we didn’t know that, and wanted a model to <strong>learn the pattern</strong>? One of the simplest models we can try is <strong>Linear Regression</strong>.</p><h3>What Linear Regression Tries to Do</h3><p>Linear Regression tries to find a <strong>straight-line relationship</strong> between your input (X) and output (y).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*4jTCJwGsrBdFFNz6yZPWzA.png" /></figure><p>It assumes the data can be represented like this:</p><p>y = β0​+β1​X</p><p>Where:</p><ul><li>β0​ = intercept (where the line crosses the y-axis)</li><li>β1​ = slope (how much y changes when X increases by 1)</li><li>Together, these are the model parameters: θ = (β0 , β1).</li></ul><p>So, in plain words: the model is just trying to <strong>draw the best straight line through the data points</strong>.</p><h3>How Does It Find the Best Line?</h3><p>To figure out β0 and β1 ​, Linear Regression uses some math (don’t worry, just two neat formulas):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*8kDTHIR68pnNe9aMHOU1hQ.png" /></figure><p>Where:</p><ul><li>Xˉ= average of X values</li><li>yˉ​ = average of y values</li></ul><p>This process basically says:<br> “<strong>Find the slope and intercept that make the line fit the data as closely as possible</strong>.”</p><h3>Applying It to Our Example</h3><p>Step 1: Calculate Means</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*oK2IwJCJuEFdcQqnhuPliw.png" /></figure><p>Step 2: Calculate the Slope (β1​)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YOrwfUnnBczggINRR5ndRw.png" /></figure><p>Step 3: Calculate the Intercept (β0​)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*j6g-I6bvi-VZNvwvKagAjw.png" /></figure><p>4. Final Regression Line</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*Qq5AElT0L5y2FWiaSLhteg.png" /></figure><p>5. Prediction Example</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*VGfhPiZPHce9dc8YaWdyFg.png" /></figure><p>Interesting, right? The model predicts 29.5, not 25.</p><p>Why? Because Linear Regression is <strong>linear</strong> — it can only fit a straight line, while our data follows a <strong>curve</strong> (y = X²). Still, this illustrates how Linear Regression works: it always tries to fit the best possible straight line through your data.</p><h3>✅ Key Takeaways</h3><ul><li>Linear Regression is about fitting a <strong>straight line</strong> to approximate the relationship between X and y.</li><li>The line is defined by two parameters: θ=(β0,β1).</li><li>It works best when your data follows a <strong>linear trend</strong>, but it’s also a foundation for more advanced models.</li><li>Sometimes (like in our quadratic example), it won’t be perfect — but that’s part of the learning journey.</li></ul><h3>What’s Next?</h3><p>In real-world practice, you don’t have to calculate these formulas by hand. Python’s <strong>scikit-learn</strong> library makes it as simple as a few lines of code.</p><p>If you’re curious, I can share a <strong>step-by-step Python implementation</strong> of this example in the next post.</p><p>✨ That’s it! With just a handful of numbers, you now understand how Linear Regression finds its best-fit line.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52755d343359" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Code Example for React Relay usepaginationFragment Hook]]></title>
            <link>https://medium.com/@murali.chepuri/code-example-for-react-relay-usepaginationfragment-hook-2d0b2d7abe1c?source=rss-e5b3a54794eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d0b2d7abe1c</guid>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[relay-modern]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Murali Chepuri]]></dc:creator>
            <pubDate>Sun, 13 Apr 2025 09:47:37 GMT</pubDate>
            <atom:updated>2025-04-13T22:48:27.910Z</atom:updated>
            <content:encoded><![CDATA[<p>⚠️ <strong>Heads up!</strong><br> This article jumps straight into the technical implementation of Relay’s usePaginationFragment hook.<br> If you&#39;re looking for a more conceptual overview or want to understand the “why” before the “how,” start here first:<br> 👉 <a href="https://medium.com/@murali.chepuri/react-pagination-made-easy-with-relay-usepaginatedfragment-hook-98464d13257c">React Pagination Made Easy with Relay usePaginationFragment Hook</a></p><h3>🎯 The Baseline: A Non-Paginated Fragment</h3><p>We’ll use a basic <a href="https://github.com/relayjs/relay-examples/blob/main/newsfeed/src/components/StoryCommentsSection.tsx">StoryCommentsSection</a> component that displays a few comments on a story. Here&#39;s the original fragment and render logic:</p><pre>const StoryCommentsSectionFragment = graphql`<br>  fragment StoryCommentsSectionFragment on Story {<br>    comments(first: 3) {<br>      edges {<br>        node {<br>          id<br>          ...CommentFragment<br>        }<br>      }<br>      pageInfo {<br>        hasNextPage<br>      }<br>    }<br>  }<br>`;<br></pre><p>and below <strong>render</strong> code</p><pre>export default function StoryCommentsSection({ story }: Props) {<br>  const data = useFragment(StoryCommentsSectionFragment, story);<br>  const onLoadMore = () =&gt; {<br>    /* TODO */<br>  };<br>  return (<br>    &lt;div&gt;<br>      {data.comments.edges.map((edge) =&gt; (<br>        &lt;Comment key={edge.node.id} comment={edge.node} /&gt;<br>      ))}<br>      {data.comments.pageInfo.hasNextPage &amp;&amp; (<br>        &lt;LoadMoreCommentsButton onClick={onLoadMore} /&gt;<br>      )}<br>    &lt;/div&gt;<br>  );<br>}</pre><p>Now lets take a closer look at some lines of code here</p><p>First,</p><pre>const data = useFragment(StoryCommentsSectionFragment, story);</pre><p>This is just a regular fragment hook which stores the response in data object.</p><pre>{data.comments.pageInfo.hasNextPage &amp;&amp; (<br>        &lt;LoadMoreCommentsButton onClick={onLoadMore} /&gt;<br>)}</pre><p>Here we are checking if response has next page, then show LoadMoreComments button.</p><p>At this point, everything works — except pagination! Clicking the “Load More” button does nothing yet.</p><blockquote><strong>use pagination fragment</strong></blockquote><h3>🔄 Making the Fragment Paginatable</h3><p>To enable pagination, we need to modify the fragment in a few key ways.</p><h3>1. Add @refetchable Directive</h3><p>Relay needs to know how to refetch this fragment with new variables. That’s where the @refetchable directive comes in:</p><pre>@refetchable(queryName: &quot;StoryCommentsPaginationQuery&quot;)</pre><h3>2. Replace Hardcoded Pagination Params</h3><p>Instead of fetching a static number of comments, we’ll pass dynamic variables</p><pre>comments(first: $count,after: $cursor)</pre><p>This means, we are passing two parameters, the first one tells how many records we need to fetch and the second one tells the offset.</p><blockquote>From 1st ($cursor) record fetch 10 records ($count) ?</blockquote><blockquote>10th ($cursor) record? 20th record ($count)? … etc!</blockquote><h3>Add a @connection Directive</h3><p>Relay uses @connection to track paginated data:</p><pre>@connection(key: &quot;StoryComments_story_comments&quot;) {</pre><p>Add a connection object. Relay uses this connection for pagination. <strong>According to relay documentation..</strong></p><p><a href="https://relay.dev/docs/guided-tour/list-data/connections/">Connections | Relay</a></p><blockquote>Often times we don’t want to query the <em>entire</em> set of data up front, but rather discrete sub-parts of the list, incrementally, usually in response to user input or other events. Querying a list of data in discrete parts is usually known as <a href="https://graphql.org/learn/pagination/">Pagination</a>.</blockquote><h3>✅ Updated Fragment</h3><p>Here’s what the updated fragment looks like:</p><pre>const StoryCommentsSectionFragment = graphql`<br>  fragment StoryCommentsSectionFragment on Story<br>  @refetchable(queryName: &quot;StoryCommentsPaginationQuery&quot;)<br>  @argumentDefinitions(<br>    count : {type: &quot;Int&quot;,defaultValue:5}<br>    cursor:{type: &quot;String&quot;}<br>  )  {<br>    comments(first: $count,after: $cursor)<br>    @connection(key: &quot;StoryComments_story_comments&quot;) {<br>      edges {<br>        node {<br>          id<br>          ...CommentFragment<br>        }<br>      }<br>      pageInfo {<br>        hasNextPage<br>      }<br>    }<br>  }<br>`;</pre><h3>Switching to usePaginationFragment</h3><p>Now, instead of using useFragment, we switch to usePaginationFragment:</p><pre>const {data,<br>    loadNext,<br>    loadPrevious,<br>    hasNext,<br>    hasPrevious,<br>    isLoadingNext,<br>    isLoadingPrevious,<br>    refetch} = usePaginationFragment&lt;{variables:{},response:{}},StoryCommentsSectionFragment$key&gt;<br>      (StoryCommentsSectionFragment, story);</pre><p>usePaginationFragment gives you powerful pagination helpers like loadNext() and hasNext.</p><p>Now let’s see how these methods will help paginate.</p><h3>🧪 Hooking Up the Load More Button</h3><p>Remember that onLoadMore function we left empty? Let’s wire it up:</p><pre>{data.comments.pageInfo.hasNextPage &amp;&amp; (<br>        &lt;LoadMoreCommentsButton onClick={onLoadMore} /&gt;<br>      )}</pre><pre>const onLoadMore = () =&gt; {<br>    loadNext(5);<br>  };</pre><p>Boom! Now your “Load More” button actually loads more.</p><h3>🧩 Final Component Code</h3><p>Here’s the complete, upgraded component using Relay pagination:</p><pre>import * as React from &quot;react&quot;;<br>import { graphql } from &quot;relay-runtime&quot;;<br>import { usePaginationFragment } from &quot;react-relay&quot;;<br>import type { StoryCommentsSectionFragment$data,<br>  StoryCommentsSectionFragment$key<br> } from &quot;./__generated__/StoryCommentsSectionFragment.graphql&quot;;<br>import Comment from &quot;./Comment&quot;;<br>import LoadMoreCommentsButton from &quot;./LoadMoreCommentsButton&quot;;<br>import type {NewsfeedQuery$data} from &#39;./__generated__/NewsfeedQuery.graphql&#39;<br>export type Props = {<br>  story: StoryCommentsSectionFragment$key;<br>};<br><br>const StoryCommentsSectionFragment = graphql`<br>  fragment StoryCommentsSectionFragment on Story<br>  @refetchable(queryName: &quot;StoryCommentsPaginationQuery&quot;)<br>  @argumentDefinitions(<br>    count : {type: &quot;Int&quot;,defaultValue:5}<br>    cursor:{type: &quot;String&quot;}<br>  )  {<br>    comments(first: $count,after: $cursor)<br>    @connection(key: &quot;StoryComments_story_comments&quot;) {<br>      edges {<br>        node {<br>          id<br>          ...CommentFragment<br>        }<br>      }<br>      pageInfo {<br>        hasNextPage<br>      }<br>    }<br>  }<br>`;<br><br>export default function StoryCommentsSection( {story} : Props) {<br>  const {data,<br>    loadNext,<br>    loadPrevious,<br>    hasNext,<br>    hasPrevious,<br>    isLoadingNext,<br>    isLoadingPrevious,<br>    refetch} = usePaginationFragment&lt;{variables:{},response:{}},StoryCommentsSectionFragment$key&gt;<br>      (StoryCommentsSectionFragment, story);<br>  const onLoadMore = () =&gt; {<br>    loadNext(5);<br>  };<br>  return (<br>    &lt;div&gt;<br>      <br>      {data.comments?.edges.map((edge) =&gt; (<br>        &lt;Comment key={edge.node.id} comment={edge.node} /&gt;<br>      ))}<br>      {data.comments.pageInfo.hasNextPage &amp;&amp; (<br>        &lt;LoadMoreCommentsButton onClick={onLoadMore} /&gt;<br>      )}<br>    &lt;/div&gt;<br>  );<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SB7KJIIrTt29D3P7f5ukxQ.jpeg" /></figure><h3>✨ Wrapping Up</h3><p>And there you have it — you’ve successfully converted a static fragment into a fully paginated one using Relay’s usePaginationFragment.</p><p>Relay’s approach to pagination is clean, declarative, and designed for modern React apps. With just a few changes to your fragment and hook usage, you unlock powerful data-fetching capabilities tailored for incremental loading.</p><p>Let me know in the comments if you found this useful or have questions! 🔁</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d0b2d7abe1c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React pagination made easy with relay usePaginatedFragment hook]]></title>
            <link>https://medium.com/@murali.chepuri/react-pagination-made-easy-with-relay-usepaginatedfragment-hook-98464d13257c?source=rss-e5b3a54794eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/98464d13257c</guid>
            <category><![CDATA[frontend-development]]></category>
            <category><![CDATA[relay-modern]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[reactjs]]></category>
            <dc:creator><![CDATA[Murali Chepuri]]></dc:creator>
            <pubDate>Sun, 13 Apr 2025 07:13:13 GMT</pubDate>
            <atom:updated>2025-04-13T07:13:47.245Z</atom:updated>
            <content:encoded><![CDATA[<p>Pagination can often feel more complex than it should be. Have you ever found yourself breezing through UI components like cards, only to hit a wall when trying to implement a simple data table with pagination? Or tried to mimic Facebook-style infinite scrolling, only to get bogged down in custom logic and state handling?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nUvvNNniG_B5P8SYEI4r4g.png" /></figure><p>The good news: Relay offers a clean, standardized solution — <strong>paginated fragments</strong>.</p><h3>🧩 What Are Paginated Fragments?</h3><p>Paginated fragments are just like regular Relay fragments — but with superpowers.</p><p>They accept additional parameters like:</p><ul><li>count – how many items to load</li><li>cursor – where to continue from</li></ul><p>They also return a powerful set of built-in methods and flags</p><pre>const {<br>  loadNext,<br>  loadPrevious,<br>  hasNext,<br>  hasPrevious,<br>  isLoadingNext,<br>  isLoadingPrevious<br>} = usePaginationFragment(...);</pre><ul><li>loadNext(count) – Fetch the next set of items</li><li>loadPrevious(count) – Fetch the previous set of items</li><li>hasNext – Boolean: more items available after current set</li><li>hasPrevious – Boolean: more items available before current set</li><li>isLoadingNext – Boolean: indicates if loadNext is in progress</li><li>isLoadingPrevious – Boolean: indicates if loadPrevious is in progress</li></ul><p>This API allows your components to stay clean and declarative, with minimal logic required for smooth, dynamic pagination behavior.</p><h3>⚙️ How They Work</h3><p>Under the hood, paginated fragments are tied to a GraphQL <strong>connection</strong> field. Here’s the basic flow:</p><p><strong>Initial render</strong>: The component fetches and displays the initial batch of items via the fragment.</p><ol><li><strong>User interaction</strong>: When users scroll or click a button, methods like loadNext or loadPrevious are invoked.</li><li><strong>Relay magic</strong>: Data is fetched, merged into the store, and your UI updates automatically — with built-in loading state indicators available to show spinners or disable buttons.</li></ol><p>No need for manual state, cache updates, or imperative data flow.</p><h3>✅ Why Use Paginated Fragments?</h3><p>Paginated fragments bring a ton of benefits to your codebase:</p><ul><li>🧼 <strong>Cleaner Code</strong> — Avoid boilerplate pagination logic</li><li>🧠 <strong>Declarative Flow</strong> — Data and behavior live together in your component</li><li>⚡ <strong>Performance</strong> — Built-in support for caching, request deduping, and batched updates</li><li>🔁 <strong>Reusability</strong> — Works across feeds, tables, lists, dashboards, and more</li></ul><h3>💡 Want a Code Example?</h3><p>If you’re curious what this looks like in a real-world React + Relay setup — with a full example including fragment definitions, component logic, and GraphQL schema — I will be sharing one shortly. Just let me know in the comments!</p><h3>🎯 TL;DR</h3><p>Relay paginated fragments provide a sleek, standardized way to handle pagination — whether it’s infinite scrolling, “Load More” buttons, or navigating data tables.</p><p>With just a few parameters and a highly expressive set of methods, they remove the heavy lifting and let you focus on building a great experience.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98464d13257c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Invalid Hook Call Error : Another cause]]></title>
            <link>https://medium.com/@murali.chepuri/invalid-hook-call-error-another-cause-5fb59710c269?source=rss-e5b3a54794eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fb59710c269</guid>
            <category><![CDATA[hooks]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Murali Chepuri]]></dc:creator>
            <pubDate>Tue, 18 Jul 2023 06:39:03 GMT</pubDate>
            <atom:updated>2023-07-19T19:44:28.852Z</atom:updated>
            <content:encoded><![CDATA[<h3>Invalid Hook Call Error : Another cause</h3><p>you are probably here because you have exhausted trying all cases mentioned @ <a href="https://legacy.reactjs.org/warnings/invalid-hook-call-warning.html">https://legacy.reactjs.org/warnings/invalid-hook-call-warning.html</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OG60ywkY4PBllo80H50pqQ.png" /></figure><p>Sometimes, this error is very tricky and could happen outside of the cases mentioned above too.</p><p>Lets review one of the case i came across,</p><p>My project is here <a href="https://github.com/mchepuri/InvalidHookCall">https://github.com/mchepuri/InvalidHookCall</a></p><ul><li>This is a simple react project with one root router with a Main component.</li><li>Main Component imports two components Landing and About.</li><li>&lt;Landing/&gt; is a regular import and &lt;About/&gt; is a Lazy import.</li><li>Both Landing and About are in components folder</li></ul><blockquote>When &lt;Landing/&gt; is imported from index.js <strong>import {Landing} from ‘../components’;</strong> you will run in to Invalid Hook Error In Safari browser ( chrome and other browsers works just fine with a warning in Components devtools plugin), it is a blocking error and the browser wont render your app.</blockquote><blockquote>To fix it try to import it directly, import Landing from ‘../components/Landing/Landing’;</blockquote><p>This will fix the blocking error on safari but still leaves a warning in devtools plugin.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fb59710c269" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>