<?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: David Miller</title>
    <description>The latest articles on DEV Community by David Miller (@dmiller72).</description>
    <link>https://dev.to/dmiller72</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%2F469220%2Fc03f3338-bdfb-416d-b65b-161151d0107b.jpeg</url>
      <title>DEV Community: David Miller</title>
      <link>https://dev.to/dmiller72</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dmiller72"/>
    <language>en</language>
    <item>
      <title>Dynamic background image loading</title>
      <dc:creator>David Miller</dc:creator>
      <pubDate>Fri, 08 Dec 2023 21:25:05 +0000</pubDate>
      <link>https://dev.to/dmiller72/dynamin-background-image-loading-49g</link>
      <guid>https://dev.to/dmiller72/dynamin-background-image-loading-49g</guid>
      <description>&lt;p&gt;I've been trying to solve this problem for a while and just don't know what to do. I am trying to dynamically load background images according to what button is clicked. Since I don't have images for all of the buttons yet, I want a fallback background color. I've tried try/catch. I've tried an inline ternary operator for the inline CSS backgroundImage prop.. I Googled the fs library (I think it is) . Nothing is working. I stopped trying for the background color just so I can get to where Here's where I am right now:&lt;/p&gt;

&lt;p&gt;` const tryRequire = (path) =&amp;gt; {&lt;br&gt;
    try {&lt;br&gt;
      return require(path);&lt;br&gt;
    } catch (err) {&lt;br&gt;
      console.log(err.message);&lt;br&gt;
      return null; // Return null if the image is not found&lt;br&gt;
    }&lt;br&gt;
  };&lt;/p&gt;

&lt;p&gt;const backgroundImage = tryRequire(&lt;br&gt;
    &lt;code&gt;../images/category/${topic}/${topic}.jpg&lt;/code&gt;&lt;br&gt;
  );&lt;/p&gt;

&lt;p&gt;style={{  backgroundImage: backgroundImage&lt;br&gt;
                        ? &lt;code&gt;url(${backgroundImage})&lt;/code&gt;&lt;br&gt;
                        : "none",&lt;br&gt;
                      backgroundColor: backgroundImage ? "lightgrey" : "purple",}}`&lt;/p&gt;

</description>
      <category>react</category>
      <category>dynamic</category>
      <category>css</category>
      <category>jsx</category>
    </item>
    <item>
      <title>Can Anyone Relate?</title>
      <dc:creator>David Miller</dc:creator>
      <pubDate>Mon, 06 Nov 2023 15:36:05 +0000</pubDate>
      <link>https://dev.to/dmiller72/can-anyone-relate-ece</link>
      <guid>https://dev.to/dmiller72/can-anyone-relate-ece</guid>
      <description>&lt;p&gt;Just a funny question to see if anyone can relate... do you have all this green (commented out) code all over the place (instead of deleting it) just in case? Do you play it safe and wait until you know the code you have works and THEN delete unneeded code? &lt;/p&gt;

</description>
    </item>
    <item>
      <title>React Help</title>
      <dc:creator>David Miller</dc:creator>
      <pubDate>Thu, 14 Sep 2023 19:50:58 +0000</pubDate>
      <link>https://dev.to/dmiller72/react-help-1jo9</link>
      <guid>https://dev.to/dmiller72/react-help-1jo9</guid>
      <description>&lt;p&gt;Here's a link &lt;a href="https://codesandbox.io/s/tip-calculator-ff3dyv?file=/src/App.js:1168-1249"&gt;codesandbox project I'm working on&lt;/a&gt;. Can anyone tell me why the button at the bottom of form component stops resetting the Rate component once I put it inside the ternerary operator, please?&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Full Stack Web Dev</title>
      <dc:creator>David Miller</dc:creator>
      <pubDate>Tue, 06 Jul 2021 17:03:14 +0000</pubDate>
      <link>https://dev.to/dmiller72/full-stack-web-dev-3a6k</link>
      <guid>https://dev.to/dmiller72/full-stack-web-dev-3a6k</guid>
      <description>&lt;p&gt;I just found out C# can be used for full stack dev. I thought it was just software dev. Does anyone use it for that purpose? How does it compare to Python for that purpose?&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Asyncronous JS</title>
      <dc:creator>David Miller</dc:creator>
      <pubDate>Thu, 01 Jul 2021 01:28:16 +0000</pubDate>
      <link>https://dev.to/dmiller72/asyncronous-js-4p3f</link>
      <guid>https://dev.to/dmiller72/asyncronous-js-4p3f</guid>
      <description>&lt;p&gt;Is the order of progression Callbacks =&amp;gt; Promises =&amp;gt; Async/Await?  I just watched a video to helped me understand all three. Each successor seems to be the more efficient version.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>I haven't been here long but..</title>
      <dc:creator>David Miller</dc:creator>
      <pubDate>Sun, 04 Oct 2020 15:00:51 +0000</pubDate>
      <link>https://dev.to/dmiller72/i-haven-t-been-here-long-but-45bd</link>
      <guid>https://dev.to/dmiller72/i-haven-t-been-here-long-but-45bd</guid>
      <description>&lt;p&gt;So far this site already seems so much better than Stackoverflow, at least when I used to go to them for answers and fellowship with fellow techies. If I'm not allowed to say that just delete this post. No offense taken.&lt;/p&gt;

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