<?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: vesnathan</title>
    <description>The latest articles on DEV Community by vesnathan (@vesnathan).</description>
    <link>https://dev.to/vesnathan</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%2F722085%2F5a51064b-0376-4cac-8557-ddfdf2c2e61a.png</url>
      <title>DEV Community: vesnathan</title>
      <link>https://dev.to/vesnathan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vesnathan"/>
    <language>en</language>
    <item>
      <title>React Axios Newbie Issues</title>
      <dc:creator>vesnathan</dc:creator>
      <pubDate>Sat, 09 Oct 2021 03:06:58 +0000</pubDate>
      <link>https://dev.to/vesnathan/react-axios-newbie-issues-4gne</link>
      <guid>https://dev.to/vesnathan/react-axios-newbie-issues-4gne</guid>
      <description>&lt;p&gt;Hi there, I have the following code:&lt;br&gt;
`&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
const PAGE_DATA_URL = '&lt;a href="http://localhost:3000/dataAPI.html"&gt;http://localhost:3000/dataAPI.html&lt;/a&gt;';&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
function App() {&lt;br&gt;
    const [post, setPost] = React.useState(null);&lt;br&gt;
    React.useEffect(() =&amp;gt; {&lt;br&gt;
        axios.get(PAGE_DATA_URL).then((response) =&amp;gt; {&lt;br&gt;
          setPost(response.data);&lt;br&gt;
          //pageData = response.data;&lt;br&gt;
          console.log(response.data);&lt;br&gt;
        });&lt;br&gt;
    }, [] );&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return (
    &amp;lt;ThemeProvider theme={theme}&amp;gt;

    &amp;lt;div&amp;gt;
        &amp;lt;Navbar  expand="lg" fixed="top" bg="primary"&amp;gt;

            &amp;lt;Navbar.Brand href="#home"&amp;gt;{post.name}&amp;lt;/Navbar.Brand&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
`&lt;/p&gt;

&lt;p&gt;The response.data is logging, but I assume it hasn't loaded by the time Navbar is rendered. If that is the issue, how might I go about waiting for the response before rendering anything?&lt;/p&gt;

&lt;p&gt;Cheers!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
