<?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: SunbeamRapier</title>
    <description>The latest articles on DEV Community by SunbeamRapier (@sunbeamrapier).</description>
    <link>https://dev.to/sunbeamrapier</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%2F402250%2F51cbc9d3-f346-4b17-91db-924c59e102d1.jpeg</url>
      <title>DEV Community: SunbeamRapier</title>
      <link>https://dev.to/sunbeamrapier</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sunbeamrapier"/>
    <language>en</language>
    <item>
      <title>ReactJS Suppressing the footer element when user navigates to a page</title>
      <dc:creator>SunbeamRapier</dc:creator>
      <pubDate>Sat, 18 Sep 2021 08:50:11 +0000</pubDate>
      <link>https://dev.to/sunbeamrapier/reactjs-suppressing-the-footer-element-when-user-navigates-to-a-page-8k6</link>
      <guid>https://dev.to/sunbeamrapier/reactjs-suppressing-the-footer-element-when-user-navigates-to-a-page-8k6</guid>
      <description>&lt;p&gt;I want to suppress the footer permanently when a user navigates to a specific page for my new book (the footer encourages the user to visit this page and would be annoying if on permanently).&lt;/p&gt;

&lt;p&gt;I thought it would be relatively easy to count the actual page views (ignoring the  startup execution of the code.)&lt;/p&gt;

&lt;p&gt;The view count uses state: &lt;/p&gt;

&lt;p&gt;const [DisplayCount, setDisplayCount] = useState(0); &lt;/p&gt;

&lt;p&gt;But I can't update the value in DisplayCount when the user navigates to the page whatever I try.&lt;/p&gt;

&lt;p&gt;There are no buttons involved and a regular function called by the main function will update the value and attempts to return it, but the main function ignores the returned values.&lt;/p&gt;

&lt;p&gt;from Chrome DevTools...&lt;br&gt;
Function  - DisplayCount after increment = [1]&lt;br&gt;
Function  - Returning [1]&lt;/p&gt;

&lt;p&gt;MAIN  - Function returned DisplayCount = [0]&lt;/p&gt;

&lt;p&gt;It is such a simple thing, but I have spent 2 days on this now and have not got anywhere...&lt;/p&gt;

&lt;p&gt;Any suggestions greatly appreciated !&lt;/p&gt;

&lt;p&gt;Rapier&lt;/p&gt;

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