<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hiroshima</title>
    <description>The latest articles on DEV Community by Hiroshima (@raman79).</description>
    <link>https://dev.to/raman79</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F866937%2Faff08cf6-04bc-4b99-9235-f9231ab510f6.jpg</url>
      <title>DEV Community: Hiroshima</title>
      <link>https://dev.to/raman79</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/raman79"/>
    <language>en</language>
    <item>
      <title>Undefined error</title>
      <dc:creator>Hiroshima</dc:creator>
      <pubDate>Tue, 24 May 2022 04:15:06 +0000</pubDate>
      <link>https://dev.to/raman79/undefined-error-2o76</link>
      <guid>https://dev.to/raman79/undefined-error-2o76</guid>
      <description>&lt;p&gt;&lt;code&gt;const ProductScreen = ({ match }) =&amp;gt; {&lt;br&gt;
    const [product, setProduct] = useState({})&lt;br&gt;
    useEffect(() =&amp;gt; {&lt;br&gt;
        const fetchProduct = async () =&amp;gt; {&lt;br&gt;
            const { data } = await axios.get(&lt;/code&gt;/api/products/${match.params.id}&lt;code&gt;)&lt;br&gt;
            setProduct(data)&lt;br&gt;
        }&lt;br&gt;
        fetchProduct();&lt;br&gt;
    })&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I'm using useEffect and axios to get the data from backend but the console keeps on showing me this error&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;TypeError: Cannot read properties of undefined (reading 'params')&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>react</category>
    </item>
  </channel>
</rss>
