<?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>Forem: Diogo Capela</title>
    <description>The latest articles on Forem by Diogo Capela (@diogocapela).</description>
    <link>https://forem.com/diogocapela</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%2F93117%2F672f0076-b5e0-4afb-845e-e0125ec33adf.jpg</url>
      <title>Forem: Diogo Capela</title>
      <link>https://forem.com/diogocapela</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/diogocapela"/>
    <language>en</language>
    <item>
      <title>An alternative to Product Hunt, made for indie makers</title>
      <dc:creator>Diogo Capela</dc:creator>
      <pubDate>Wed, 09 Apr 2025 23:44:53 +0000</pubDate>
      <link>https://forem.com/diogocapela/an-alternative-to-product-hunt-made-for-indie-makers-3o9m</link>
      <guid>https://forem.com/diogocapela/an-alternative-to-product-hunt-made-for-indie-makers-3o9m</guid>
      <description>&lt;p&gt;I've had this side project for a while now called &lt;a href="https://awesomeindie.com" rel="noopener noreferrer"&gt;Awesome Indie&lt;/a&gt;, it is an alternative to Product Hunt, made for indie makers.&lt;/p&gt;

&lt;p&gt;Recently, I decided to revamp the tech stack and give the UI/UX a much-needed refresh. I’d love to get some feedback from other makers and builders.&lt;/p&gt;

&lt;p&gt;You can check it out at &lt;a href="https://awesomeindie.com" rel="noopener noreferrer"&gt;awesomeindie.com&lt;/a&gt;, any thoughts or suggestions are super welcome!&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;

</description>
      <category>startup</category>
      <category>webdev</category>
      <category>ai</category>
      <category>programming</category>
    </item>
    <item>
      <title>A checklist on how I approach technical SEO</title>
      <dc:creator>Diogo Capela</dc:creator>
      <pubDate>Tue, 17 Dec 2024 21:11:51 +0000</pubDate>
      <link>https://forem.com/diogocapela/a-checklist-on-how-i-approach-technical-seo-22m3</link>
      <guid>https://forem.com/diogocapela/a-checklist-on-how-i-approach-technical-seo-22m3</guid>
      <description>&lt;p&gt;These days SEO is mostly about delivering an overall great user experience, optimizing the experience for humans, not for bots. Still, having a solid structure behind the scenes can help search engine crawlers find, navigate, and index your content more easily. With that in mind, I compiled a checklist of topics I usually go through to ensure all my sites are SEO-friendly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use server-side rendering (SSR)
&lt;/h2&gt;

&lt;p&gt;When you use server-side rendering, you're basically serving up a page's entire HTML content right from the start. This approach makes it much simpler for search engines to see what's on your pages, especially if you're working with JavaScript-heavy applications, where the actual content might not be in the initial HTML. Plus, SSR can boost your site's performance, cutting down on the time it takes for the first element to pop up on the screen. Since page speed and immediate visibility are ranking factors, it's worth paying attention to SSR.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create a sitemap
&lt;/h2&gt;

&lt;p&gt;Think of a sitemap as a blueprint for your website that you hand over to search engines. In an XML sitemap, you list out the pages you want crawled, how they relate to each other, their specific priorities, and how often they're updated. This is especially handy for big sites or those with complicated navigation. With a solid sitemap, crawlers don't have to hunt for important content—it's all right there, making it more likely that your pages will get indexed correctly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Structured data (JSON-LD)
&lt;/h2&gt;

&lt;p&gt;By sprinkling in structured data (usually with JSON-LD), you're giving search engines extra clues about what your content actually means. Instead of just reading text, they understand context. This can lead to rich search results on search engines such as Google, like review stars, event listings, or product details, which makes your listings more eye-catching and can improve click-through rates. Google prefers JSON-LD, and you don't need to alter your existing HTML layout to implement it.&lt;/p&gt;

&lt;p&gt;You can validate your JSON-LD implementation using tools like &lt;a href="https://validator.schema.org" rel="noopener noreferrer"&gt;Schema.org's Validator&lt;/a&gt;. This helps ensure your structured data is correctly formatted and will be properly understood by search engines.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flo81azvo2f61exptrkdv.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flo81azvo2f61exptrkdv.jpg" alt="Schema.org Validator" width="800" height="443"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The validator will highlight any errors or warnings in your markup, making it easier to fix issues before they impact your SEO efforts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Add Open Graph protocol and Twitter Cards meta tags
&lt;/h2&gt;

&lt;p&gt;The Open Graph protocol and Twitter Cards give you control over how your content is displayed when shared on social media. By setting titles, descriptions, and images with these tags, you make your content more visually appealing and clickable on platforms like Facebook, Twitter, and LinkedIn. It's all about catching users' eyes and driving more traffic from the social world.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- Open Graph --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:title"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"My Article Title"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:description"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"My Article Description"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:image"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/image.jpg"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- Twitter Cards --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"twitter:card"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"summary_large_image"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"twitter:title"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"My Article Title"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"twitter:description"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"My Article Description"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"twitter:image"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/image.jpg"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Add a web manifest file
&lt;/h2&gt;

&lt;p&gt;If you've got a web app, your &lt;code&gt;manifest.json&lt;/code&gt; file is basically a business card for search engines and browsers. It tells them what your app is called, which icons to use, and how it should look and feel on various devices. This info helps create a more "app-like" vibe for your site — super helpful for progressive web apps (PWAs) — and can lead to better engagement and a more polished user experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configure a robots.txt file
&lt;/h2&gt;

&lt;p&gt;Your &lt;code&gt;robots.txt&lt;/code&gt; file is like a set of house rules for search engine crawlers. By giving specific instructions on which areas of your site are off-limits, you prevent the bots from wasting time on pages that don't matter (like routes behind authentication). While &lt;code&gt;robots.txt&lt;/code&gt; isn't a security tool, it does help search engines focus their "crawl budget" on the pages you actually care about. Managing this file carefully improves how efficiently your site gets indexed.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/IXNEVt9rZG8"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Optimize images
&lt;/h2&gt;

&lt;p&gt;Images can slow down your site if they're not handled correctly. By using the right file formats, compressing images, and giving them meaningful alt text, you'll speed up load times and help search engines understand what's in those images. This supports accessibility, improves user experience, and can even boost your Core Web Vitals metrics.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup a solid internal linking strategy
&lt;/h2&gt;

&lt;p&gt;Internal links help users and search engines navigate your site more easily. By strategically linking your pages, you highlight important content and create a logical path through your website. This not only improves the user journey but can also support better rankings, as it helps search engines understand the hierarchy and relevance of your content.&lt;/p&gt;

&lt;h2&gt;
  
  
  HTTPS everywhere
&lt;/h2&gt;

&lt;p&gt;HTTPS is non-negotiable these days. Aside from protecting your users by encrypting data, it's also a ranking factor, search engines want secure sites to show up first. Beyond SEO, it builds trust, protects sensitive info, and is often required for modern web features like service workers and PWAs.&lt;/p&gt;

&lt;p&gt;If you haven't switched yet, it's time. You can use &lt;a href="https://letsencrypt.org" rel="noopener noreferrer"&gt;Let's Encrypt&lt;/a&gt; to get a free SSL certificate or you can proxy your site through &lt;a href="https://cloudflare.com" rel="noopener noreferrer"&gt;Cloudflare&lt;/a&gt; to get HTTPS handled for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  App security headers
&lt;/h2&gt;

&lt;p&gt;Security headers like &lt;code&gt;Content-Security-Policy&lt;/code&gt; and &lt;code&gt;Strict-Transport-Security&lt;/code&gt; add an extra layer of protection for your site and its visitors. While these don't directly increase rankings, they build trust and credibility, making it less likely that search engines or users will view your site as risky.&lt;/p&gt;

&lt;p&gt;You can check your site's security headers rating using the &lt;a href="https://observatory.mozilla.org" rel="noopener noreferrer"&gt;Mozilla Observatory&lt;/a&gt;. This tool analyzes your site's security headers and provides recommendations for improvement.&lt;/p&gt;

&lt;h2&gt;
  
  
  Have canonical metatags
&lt;/h2&gt;

&lt;p&gt;Canonical tags help solve the headache of duplicate content. If you've got a bunch of URLs that lead to the same or very similar content, canonical tags tell search engines which one to treat as the real deal. This ensures your chosen URL gets the ranking power and prevents your SEO efforts from getting split up across multiple pages.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"canonical"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/page"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Use hreflang tags if you have multiple languages
&lt;/h2&gt;

&lt;p&gt;If you're serving content to a global audience or translating it into multiple languages, the hreflang attribute guides search engines to show the most relevant language or regional version of your page. This prevents users from landing on the wrong language page and keeps your content from competing with itself across different languages.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"alternate"&lt;/span&gt; &lt;span class="na"&gt;hreflang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/en"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"alternate"&lt;/span&gt; &lt;span class="na"&gt;hreflang=&lt;/span&gt;&lt;span class="s"&gt;"fr"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/fr"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Follow a mobile-first design
&lt;/h2&gt;

&lt;p&gt;With Google's mobile-first indexing, it's no longer enough to have a site that looks okay on phones. The mobile experience now sets the baseline. Designing with mobile in mind from the start ensures your site is easy to navigate and interact with on smaller screens. Given how many users browse on their phones, going mobile-first can significantly improve both your rankings and your bottom line.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build using semantic HTML
&lt;/h2&gt;

&lt;p&gt;Semantic HTML means using markup that clearly describes the purpose of each element. Instead of just putting everything in generic &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; tags, you use things like &lt;code&gt;&amp;lt;article&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt;, or &lt;code&gt;&amp;lt;footer&amp;gt;&lt;/code&gt;. This makes your content easier for both people and search engines to understand. In turn, that can help with accessibility, SEO, and maintainability of your code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;nav&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Home&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/about"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;About&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/nav&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;main&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Main title&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;article&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Article title&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Article content&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/main&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;aside&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Sidebar content&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/aside&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;footer&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Footer content&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/footer&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  No layout shifts
&lt;/h2&gt;

&lt;p&gt;Ever try to click a button on a page, only for it to suddenly jump and make you click something else instead? That's a layout shift, and it's frustrating. Minimizing these shifts by properly sizing images, managing fonts, and reserving space for dynamic elements makes your site feel stable and professional. Reducing layout shifts contributes to a better user experience and better Core Web Vitals scores.&lt;/p&gt;

&lt;h2&gt;
  
  
  Provide RSS feeds
&lt;/h2&gt;

&lt;p&gt;Though &lt;a href="https://rssboard.org/rss-specification" rel="noopener noreferrer"&gt;RSS&lt;/a&gt; may seem old-school, it's still a useful way for people and other sites to keep track of your updates. Users can subscribe to your content, and other websites can easily syndicate it. This can help expand your reach, keep your audience informed, and even boost visibility outside traditional search results.&lt;/p&gt;

&lt;h2&gt;
  
  
  Manage redirects
&lt;/h2&gt;

&lt;p&gt;When you change a page's URL or retire a piece of content, you need a proper redirect strategy. Using the right redirect codes (301 for permanent, 302 for temporary) ensures search engines know what's going on and passes any existing "link juice" to the correct page. Good redirect management keeps your SEO intact and prevents broken links that frustrate users.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sign up for Google Search Console and Bing Webmaster Tools
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://search.google.com/search-console" rel="noopener noreferrer"&gt;Google Search Console&lt;/a&gt; and &lt;a href="https://bing.com/webmasters" rel="noopener noreferrer"&gt;Bing Webmaster Tools&lt;/a&gt; are your direct lines of communication with the most popular search engines. These platforms help you understand how they're seeing your site, alert you to issues, and show you which queries bring people to your pages. By using these tools, you can fix problems quickly, submit sitemaps, and constantly refine your SEO strategy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ensure accessibility
&lt;/h2&gt;

&lt;p&gt;Making your site accessible ensures that more people can use it easily. Proper ARIA labels, keyboard navigation, good color contrast, and text alternatives for images help everyone. A more accessible site often has a cleaner structure and better metadata, which can also give you an SEO edge.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check Core Web Vitals
&lt;/h2&gt;

&lt;p&gt;Core Web Vitals are basically Google's way of measuring whether your site's user experience cuts the mustard. They focus on things like how quickly the main content shows up, how responsive the page is, and how stable the layout remains while loading. Getting these metrics right can boost both your rankings and overall user satisfaction. It's a win-win.&lt;/p&gt;

&lt;p&gt;You can use tools like &lt;a href="https://search.google.com/search-console" rel="noopener noreferrer"&gt;Google Search Console&lt;/a&gt; to check your Core Web Vitals.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run Lighthouse reports
&lt;/h2&gt;

&lt;p&gt;Similar to Core Web Vitals, &lt;a href="https://chromewebstore.google.com/detail/lighthouse/blipmdconlkpinefehnmjammfjpmpbjk" rel="noopener noreferrer"&gt;Lighthouse&lt;/a&gt; helps you improve the performance, accessibility, and security of your site. It's a free Chrome extension that you can run on your site to get a detailed report on how your site performs.&lt;/p&gt;

</description>
      <category>seo</category>
      <category>web</category>
      <category>http</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The best domain name generators on the web</title>
      <dc:creator>Diogo Capela</dc:creator>
      <pubDate>Sun, 19 May 2024 23:42:49 +0000</pubDate>
      <link>https://forem.com/diogocapela/the-best-domain-name-generators-on-the-web-4a4o</link>
      <guid>https://forem.com/diogocapela/the-best-domain-name-generators-on-the-web-4a4o</guid>
      <description>&lt;p&gt;Around September 2022, one of my most-used web tools suddenly went offline. This tool was NameMesh, the best domain generator tool I've ever encountered.&lt;/p&gt;

&lt;p&gt;If you have ever had to find an available domain for a side project, you know how hard it can be. Most domains that use common words or are very short in length are either taken or priced as premium. Nowadays, finding a free domain using pronounceable English words at a regular price is like finding a needle in a haystack.&lt;/p&gt;

&lt;p&gt;NameMesh was definitely a great tool that could help anyone with that job. But after it was shut down, we were left with very few good alternatives. That's why a friend and I decided to take action and develop a free domain generator web app that would serve as an alternative for NameMesh users. It ended up being more difficult than we initially thought.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why was NameMesh my top choice?
&lt;/h2&gt;

&lt;p&gt;What made NameMesh awesome was its ability to continuously generate new domain suggestions (you just had to keep scrolling). It was the only tool I knew that could do that. Most of the alternatives out there return a fixed number of results for each search query, which is not ideal for finding a good domain name.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0uect41js3hdb099xocp.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0uect41js3hdb099xocp.jpg" alt="NameMesh Screenshot" width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Key features I loved about it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Ability to generate infinite domain suggestions (not a fixed number)&lt;/li&gt;
&lt;li&gt;Not showing unavailable or premium suggestions&lt;/li&gt;
&lt;li&gt;Different word generation algorithms (prefix, suffix, replace with numbers, synonyms, clean top-level domains)&lt;/li&gt;
&lt;li&gt;Ability to control domain length (min and max)&lt;/li&gt;
&lt;li&gt;It was reliable and fast&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  None of the alternatives are perfect
&lt;/h2&gt;

&lt;p&gt;The alternatives left that are free to use are not as good, not even our own. Nevertheless, let's take a look at the free domain name generator websites out there that I know about.&lt;/p&gt;

&lt;h2&gt;
  
  
  List of free domain name generators
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Instant Domain Search
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://instantdomainsearch.com" rel="noopener noreferrer"&gt;Instant Domain Search&lt;/a&gt; offers a fast and thorough way to search for available domain names, extensions, and domains for sale. It provides an easy-to-use platform where users can quickly find and register domains, making the process simple and efficient.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhbbf2wrwct3uiwtqhrcp.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhbbf2wrwct3uiwtqhrcp.jpg" alt="Instant Domain Search Screenshot" width="800" height="314"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Namecheap Beast Mode
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://namecheap.com/domains/registration/results/?domain=&amp;amp;type=beast" rel="noopener noreferrer"&gt;Namecheap Beast Mode&lt;/a&gt; is a powerful domain search tool offered by Namecheap that allows users to find and register multiple domain names quickly by combining keywords and filtering through various extensions and options.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmifm6x5mdqp1ey1skke1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmifm6x5mdqp1ey1skke1.jpg" alt="Namecheap Beast Mode Screenshot" width="800" height="594"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Shopify Domain Name Generator
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://shopify.com/tools/domain-name-generator" rel="noopener noreferrer"&gt;Shopify Domain Name Generator&lt;/a&gt; is a free tool that helps users find the perfect domain name for their business. By entering keywords, the generator suggests available domains with various extensions, and checks their availability instantly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdb1aqessadc5rmbc9o1p.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdb1aqessadc5rmbc9o1p.jpg" alt="Shopify Domain Name Generator Screenshot" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Domainr
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://domainr.com" rel="noopener noreferrer"&gt;Domainr&lt;/a&gt; is a domain search engine that helps users find available domain names across numerous extensions, offering real-time availability checks and alternative suggestions for creative and effective web addresses.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft73b392g0aug007cbfho.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft73b392g0aug007cbfho.jpg" alt="Domainr Screenshot" width="800" height="549"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  DomainWheel
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://domainwheel.com" rel="noopener noreferrer"&gt;DomainWheel&lt;/a&gt; is a free domain name generator that provides instant suggestions based on your keywords using AI. It helps you find creative and available domain names by generating ideas that rhyme, sound similar, or are randomly suggested.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F95qo1gjkj5bqxsolgdtk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F95qo1gjkj5bqxsolgdtk.jpg" alt="DomainWheel Screenshot" width="800" height="354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Nameboy
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://nameboy.com" rel="noopener noreferrer"&gt;Nameboy&lt;/a&gt; is a domain name generator that helps users find creative and available domain names by combining keywords, making it ideal for businesses, startups, and personal projects.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsl6z1k9svpigv30xmoog.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsl6z1k9svpigv30xmoog.jpg" alt="Nameboy Screenshot" width="800" height="342"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Naminum
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://naminum.com" rel="noopener noreferrer"&gt;Naminum&lt;/a&gt; is a free, powerful, and blazingly fast domain name generator and search engine, allowing users to quickly generate and check the availability of domain names in various extensions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhh9knzmpkj56ym9wz0kk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhh9knzmpkj56ym9wz0kk.jpg" alt="Naminum Screenshot" width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Name Lantern
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://namelantern.com" rel="noopener noreferrer"&gt;Name Lantern&lt;/a&gt; is a domain name generator that assists users in finding unique, available domain names by combining keywords and suggesting creative options for businesses and personal projects.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flwjetsoytgo5v0cllez7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flwjetsoytgo5v0cllez7.jpg" alt="Name Lantern Screenshot" width="800" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Name Bounce
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://namebounce.com" rel="noopener noreferrer"&gt;Name Bounce&lt;/a&gt; is a domain name generator that helps users find creative and available domain names by combining keywords with various extensions, ideal for businesses and personal projects.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuhd9mjgr2n6gvgrls3zb.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuhd9mjgr2n6gvgrls3zb.jpg" alt="Name Bounce Screenshot" width="800" height="342"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Lean Domain Search
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://leandomainsearch.com" rel="noopener noreferrer"&gt;Lean Domain Search&lt;/a&gt; helps users discover available domain names by combining keywords with thousands of potential options, making it easy to find creative, relevant, and memorable domain names quickly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz1nhv1o7asgv0ype57py.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz1nhv1o7asgv0ype57py.jpg" alt="Lean Domain Search Screenshot" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Micro Domains
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://micro.domains" rel="noopener noreferrer"&gt;Micro Domains&lt;/a&gt; offers a domain name generator focused on creating short, catchy, and brandable domain names, ideal for startups and entrepreneurs seeking a memorable online identity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsby4625l8dlhc6r3bbc8.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsby4625l8dlhc6r3bbc8.jpg" alt="Micro Domains Screenshot" width="800" height="485"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Name Grep
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://namegrep.com" rel="noopener noreferrer"&gt;Name Grep&lt;/a&gt; is a domain name search tool that allows users to find available domain names by filtering and matching keywords, providing creative and relevant options for various projects.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd7wocaf6e920jgfaz5xm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd7wocaf6e920jgfaz5xm.jpg" alt="Name Grep Screenshot" width="800" height="460"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  NameSnack
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://namesnack.com" rel="noopener noreferrer"&gt;NameSnack&lt;/a&gt; is an AI-powered domain name generator that combines keywords to create unique, brandable, and available domain name suggestions, catering to businesses and personal projects.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzptadgh6oriii6wujvwd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzptadgh6oriii6wujvwd.jpg" alt="NameSnack Screenshot" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  One Word Domains
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://oneword.domains" rel="noopener noreferrer"&gt;One Word Domains&lt;/a&gt; is a database of more than a million available and brandable one-word domain names, ideal for finding unique names for your next startup idea.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9uv0gdrhgfdsdcee7cj0.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9uv0gdrhgfdsdcee7cj0.jpg" alt="One Word Domains Screenshot" width="800" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  NameQL
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://nameql.com" rel="noopener noreferrer"&gt;NameQL&lt;/a&gt; helps you find a great name by searching tens of thousands of potential names and showing you the best options, only suggesting names with available .com domains.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5w2bq5zvib3bffe6zuxp.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5w2bq5zvib3bffe6zuxp.jpg" alt="NameQL Screenshot" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Panabee
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://panabee.com" rel="noopener noreferrer"&gt;Panabee&lt;/a&gt; is a versatile online tool for generating domain, app, website, and business names. It offers suggestions based on related words, translations, and alternate spellings, helping users find the perfect name effortlessly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4t2c7od6jvbzxj4de64f.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4t2c7od6jvbzxj4de64f.jpg" alt="Panabee Screenshot" width="800" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Brandpa
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://brandpa.com" rel="noopener noreferrer"&gt;Brandpa&lt;/a&gt; offers a curated selection of premium, ready-to-use domain names for businesses, streamlining the branding process with creative, memorable options and professional logo designs included.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr7zij6rkj1ctckr76uet.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr7zij6rkj1ctckr76uet.jpg" alt="Brandpa Screenshot" width="800" height="488"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Namekrea
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/cderinbogaz/namekrea" rel="noopener noreferrer"&gt;Namekrea&lt;/a&gt; is an open-source AI domain name generator powered by GPT-2, helping users find creative and available domain names by intelligently combining keywords for various projects.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb6z54obwovyn0vu4vtbo.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb6z54obwovyn0vu4vtbo.jpg" alt="Namekrea Screenshot" width="800" height="846"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>domains</category>
      <category>webdev</category>
      <category>domain</category>
      <category>web</category>
    </item>
    <item>
      <title>Learn CSS by playing games</title>
      <dc:creator>Diogo Capela</dc:creator>
      <pubDate>Wed, 15 Mar 2023 11:20:48 +0000</pubDate>
      <link>https://forem.com/diogocapela/learn-css-by-playing-games-18jm</link>
      <guid>https://forem.com/diogocapela/learn-css-by-playing-games-18jm</guid>
      <description>&lt;p&gt;CSS is an essential part of web development, as it determines most of the layout and appearance of websites. It is one of the tools that is easy to learn but hard to master. In this post I will share some of the best games that will help you learn CSS in a fun way.&lt;/p&gt;



&lt;h2&gt;
  
  
  Flexbox Froggy
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Learn the concepts of flexbox in CSS&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4cr459s5mx6d8hcksnuw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4cr459s5mx6d8hcksnuw.jpg" alt="Flexbox Froggy" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Flexbox Froggy&lt;/strong&gt; introduces players to the concepts of flexbox layout in CSS. Players must use flexbox properties to position frogs on a lily pad, working their way through progressively more difficult levels.&lt;/p&gt;

&lt;p&gt;Try it out at &lt;a href="https://flexboxfroggy.com" rel="noopener noreferrer"&gt;flexboxfroggy.com&lt;/a&gt;.&lt;/p&gt;



&lt;h2&gt;
  
  
  Grid Garden
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Learn about the CSS grid layout system&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4hgqy3ds7apk2fo9rm68.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4hgqy3ds7apk2fo9rm68.jpg" alt="Grid Garden" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Grid Garden&lt;/strong&gt; teaches players about the CSS grid layout system by challenging them to grow a garden by writing CSS code. Players must use grid properties to arrange plants in a grid, working through various levels.&lt;/p&gt;

&lt;p&gt;Try it out at &lt;a href="https://cssgridgarden.com" rel="noopener noreferrer"&gt;cssgridgarden.com&lt;/a&gt;.&lt;/p&gt;



&lt;h2&gt;
  
  
  CSS Diner
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Learn the basics of CSS selectors&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi7e3xzgfgidfbm9jnb6e.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi7e3xzgfgidfbm9jnb6e.jpg" alt="CSS Diner" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSS Diner&lt;/strong&gt; takes players through a series of increasingly difficult challenges that teach the basics of CSS selectors. Players must use the correct selectors to select a series of dishes to advance each level.&lt;/p&gt;

&lt;p&gt;Try it out at &lt;a href="https://flukeout.github.io" rel="noopener noreferrer"&gt;flukeout.github.io&lt;/a&gt;.&lt;/p&gt;



&lt;h2&gt;
  
  
  Flexbox Defense
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Move around towers to defend a road from attacks&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0h5fftzvbns7bnxpbo2x.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0h5fftzvbns7bnxpbo2x.jpg" alt="Flexbox Defense" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Flexbox Defense&lt;/strong&gt; has 12 different levels and is a great game for learning CSS. It involves placing towers to protect a road from enemy attacks.&lt;/p&gt;

&lt;p&gt;Try it out at &lt;a href="http://www.flexboxdefense.com" rel="noopener noreferrer"&gt;flexboxdefense.com&lt;/a&gt;.&lt;/p&gt;



&lt;h2&gt;
  
  
  Knights of the Flexbox Table
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Navigate the knight through the dungeon using Tailwind CSS&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4bj4ak2yg4klg77b749n.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4bj4ak2yg4klg77b749n.jpg" alt="Knights of the Flexbox Table" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Knights of the Flexbox Table&lt;/strong&gt; is a game where you help Sir Frederic Flexbox and his friends to uncover the treasures hidden in the CSS dungeons. You can navigate the knight through the dungeon by changing his position within the dungeon using Flexbox and Tailwind CSS.&lt;/p&gt;

&lt;p&gt;Try it out at &lt;a href="https://knightsoftheflexboxtable.com" rel="noopener noreferrer"&gt;knightsoftheflexboxtable.com&lt;/a&gt;.&lt;/p&gt;



&lt;h2&gt;
  
  
  Flex Box Adventure
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;A game with 24 levels of CSS challenges&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpj8s7m9mp5e5v1kzcu1k.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpj8s7m9mp5e5v1kzcu1k.jpg" alt="Flex Box Adventure" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Flex Box Adventure&lt;/strong&gt; has 24 levels and is a game where you'll have the opportunity to learn from helpful hints and test your skills with a variety of tasks. It's a great way to continue improving your understanding of CSS.&lt;/p&gt;

&lt;p&gt;Try it out at &lt;a href="https://codingfantasy.com/games/flexboxadventure" rel="noopener noreferrer"&gt;codingfantasy.com/games/flexboxadventure&lt;/a&gt;.&lt;/p&gt;



&lt;h2&gt;
  
  
  Grid Attack
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;An interactive game to practice CSS grid&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjhn3z09lx3nck5f504co.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjhn3z09lx3nck5f504co.jpg" alt="Grid Attack" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Grid Attack&lt;/strong&gt; is expertly designed and will provide you with a fun and interactive way to learn about CSS Grid. The objective is to use CSS Grid to alter the landscape to defeat demons. With 80 levels to play through, you'll have plenty of opportunities to practice and master this important web development skill.&lt;/p&gt;

&lt;p&gt;Try it out at &lt;a href="https://codingfantasy.com/games/css-grid-attack" rel="noopener noreferrer"&gt;codingfantasy.com/games/css-grid-attack&lt;/a&gt;.&lt;/p&gt;



&lt;h2&gt;
  
  
  Flexbox Zombies
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Shoot zombies while learning about flexbox&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuielv5fojud11qjkb4z6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuielv5fojud11qjkb4z6.jpg" alt="Flexbox Zombies" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Flexbox Zombies&lt;/strong&gt; has 12 chapters and up to 25 levels in each, there's plenty of content to keep you entertained. Normally, this game comes with a price tag, but it appears to be free to play indefinitely.&lt;/p&gt;

&lt;p&gt;Try it out at &lt;a href="https://mastery.games/flexboxzombies" rel="noopener noreferrer"&gt;mastery.games/flexboxzombies&lt;/a&gt;.&lt;/p&gt;



&lt;h2&gt;
  
  
  Guess CSS
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Guessing game with CSS selectors&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd0uhbgxq16c6p97omvgn.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd0uhbgxq16c6p97omvgn.jpg" alt="Guess CSS" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Guess CSS&lt;/strong&gt; challenges you to determine which selector produces the desired result. One of the benefits of this game is that you get to see the correct answer, which helps you learn. Additionally, it covers a wide range of CSS concepts, rather than focusing on just one specific aspect.&lt;/p&gt;

&lt;p&gt;Try it out at &lt;a href="https://guess-css.app" rel="noopener noreferrer"&gt;guess-css.app&lt;/a&gt;.&lt;/p&gt;



&lt;h2&gt;
  
  
  CSS Speedrun
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;CSS selector game with time pressure and replayability&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4hftj6mhcqr7wf7q3r03.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4hftj6mhcqr7wf7q3r03.jpg" alt="CSS Speedrun" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSS Speedrun&lt;/strong&gt; requires you to use CSS Selectors to target and select certain elements on the page. It adds an extra level of difficulty by requiring you to do it quickly. With 10 levels to play through, you can test your skills and try to improve your speed with each attempt.&lt;/p&gt;

&lt;p&gt;Try it out at &lt;a href="https://css-speedrun.netlify.app" rel="noopener noreferrer"&gt;css-speedrun.netlify.app&lt;/a&gt;.&lt;/p&gt;



&lt;h2&gt;
  
  
  CSS Challenges
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Improve CSS skills with daily challenges&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb7xvtrz29ey9wx5huzby.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb7xvtrz29ey9wx5huzby.jpg" alt="CSS Challenges" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSS Challenges&lt;/strong&gt; is a great tool for improving your CSS skills and learning new tricks. It provides daily challenges that will help you grow as a web developer.&lt;/p&gt;

&lt;p&gt;Try it out at &lt;a href="https://css-challenges.com" rel="noopener noreferrer"&gt;css-challenges.com&lt;/a&gt;.&lt;/p&gt;



&lt;h2&gt;
  
  
  CSSBattle
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Use your CSS skills to replicate targets with the smallest possible code&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcb2vrai5luunqchiuq5w.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcb2vrai5luunqchiuq5w.jpg" alt="CSSBattle" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSSBattle&lt;/strong&gt; challenges players to build images using CSS. Players are given a set of design constraints and must use their CSS skills to replicate targets with the smallest possible code.&lt;/p&gt;

&lt;p&gt;Try it out at &lt;a href="https://cssbattle.dev" rel="noopener noreferrer"&gt;cssbattle.dev&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>css</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Adding fallback images onto your React projects</title>
      <dc:creator>Diogo Capela</dc:creator>
      <pubDate>Fri, 11 Mar 2022 23:59:02 +0000</pubDate>
      <link>https://forem.com/diogocapela/adding-fallback-images-onto-your-react-projects-54el</link>
      <guid>https://forem.com/diogocapela/adding-fallback-images-onto-your-react-projects-54el</guid>
      <description>&lt;p&gt;If you are developing a web application, then there are a lot of things to consider. One important aspect is the images that are used, for aesthetic purposes or various other reasons (e.g. icons). Either way, it is important to have a backup plan in case images don't load for some reason.&lt;/p&gt;

&lt;p&gt;For example, if you are pulling image data from an external database or API, sometimes you can't be 100% sure that it will return you an existing image file. In those cases, you may end up with a broken image icon on your webpage, and depending on the browser, there may be no indication at all that something went wrong. Frontend developers should predict these cases and adequately provide a fallback image when it happens.&lt;/p&gt;

&lt;p&gt;To achieve this we can use the &lt;code&gt;onerror&lt;/code&gt; event handler on &lt;code&gt;img&lt;/code&gt; elements. This handle will get called if an error occurs while loading or rendering an image. According to &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#image_loading_errors" rel="noopener noreferrer"&gt;MDN Web Docs&lt;/a&gt;, it can happen in several situations, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;src&lt;/code&gt; attribute is empty or &lt;code&gt;null&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;src&lt;/code&gt; URL is the same as the URL of the page the user is currently on.&lt;/li&gt;
&lt;li&gt;The image is corrupted in some way that prevents it from being loaded.&lt;/li&gt;
&lt;li&gt;The image's metadata is corrupted in such a way that it's impossible to retrieve its dimensions, and no dimensions were specified in the &lt;code&gt;img&lt;/code&gt; element's attributes.&lt;/li&gt;
&lt;li&gt;The image is in a format not supported by the user agent.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To do this with React we just need to use &lt;code&gt;onError&lt;/code&gt; instead (the &lt;code&gt;SyntheticEvent&lt;/code&gt; wrapper from React’s event system).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;App&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;addImageFallback&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;currentTarget&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;src&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/images/fallback.png&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;img&lt;/span&gt; &lt;span class="nx"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/images/broken.png&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;alt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt; &lt;span class="nx"&gt;onError&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;addImageFallback&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If using TypeScript, we just need to properly type the &lt;code&gt;event&lt;/code&gt; parameter of the &lt;code&gt;addImageFallback&lt;/code&gt; function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;SyntheticEvent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;App&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;addImageFallback&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;SyntheticEvent&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;HTMLImageElement&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Event&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;currentTarget&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;src&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/images/fallback.png&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;img&lt;/span&gt; &lt;span class="nx"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/images/broken.png&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;alt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt; &lt;span class="nx"&gt;onError&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;addImageFallback&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's it! Now you know how to add fallback images to your React projects. Hopefully, this has been a valuable resource if you are just starting your coding journey.&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>react</category>
      <category>beginners</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>15 useful Lodash methods for everyday coding</title>
      <dc:creator>Diogo Capela</dc:creator>
      <pubDate>Wed, 02 Mar 2022 19:30:35 +0000</pubDate>
      <link>https://forem.com/diogocapela/15-useful-lodash-methods-for-everyday-coding-20op</link>
      <guid>https://forem.com/diogocapela/15-useful-lodash-methods-for-everyday-coding-20op</guid>
      <description>&lt;p&gt;&lt;a href="https://lodash.com" rel="noopener noreferrer"&gt;Lodash&lt;/a&gt; is one of the most popular open-source JavaScript libraries. It implements a lot of functional programming helpers that make everyday coding easier. It's something I use often in my own development work, and so I wanted to share with you some of the methods that I find myself using a lot.&lt;/p&gt;

&lt;p&gt;In this short post, we'll go over 15 everyday methods that, when used properly, can speed up development and make your code more readable.&lt;/p&gt;

&lt;h2&gt;
  
  
  shuffle
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Creates an array of shuffled values (using a version of the &lt;a href="https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle" rel="noopener noreferrer"&gt;Fisher-Yates shuffle&lt;/a&gt;).&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;shuffle&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lodash/shuffle&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;shuffle&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;

&lt;span class="c1"&gt;// result =&amp;gt; [2, 5, 1, 4, 3]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  orderBy
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Creates an array of elements, sorted in the specified order by the results of running each element in a collection thru each iteratee.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;orderBy&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lodash/orderBy&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;items&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Item A&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Item B&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Item C&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Item D&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;orderBy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;price&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;desc&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;asc&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;

&lt;span class="cm"&gt;/*
result =&amp;gt; [
  { name: 'Item B', price: 8 },
  { name: 'Item C', price: 4 },
  { name: 'Item D', price: 4 },
  { name: 'Item A', price: 2 }
]
*/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  chunk
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Creates an array of elements split into groups of a specified size (if the array can't be split evenly, the final chunk will only contain the remaining elements).&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;chunk&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lodash/chunk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;array&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;array&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// result =&amp;gt; [[1, 2], [3, 4]]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  take
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Creates a slice of the array with &lt;code&gt;n&lt;/code&gt; elements taken from the beginning.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;take&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lodash/take&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;take&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// result =&amp;gt; [1, 2]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  difference
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Creates an array of the values not included in the other given arrays. The order and references of result values are determined by the first array.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;difference&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lodash/difference&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;difference&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;

&lt;span class="c1"&gt;// result =&amp;gt; [1]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  intersection
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Creates an array of unique values that are included in all given arrays. The order and references of result values are determined by the first array.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;intersection&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lodash/intersection&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;intersection&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;

&lt;span class="c1"&gt;// result =&amp;gt; [2, 3]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  isEmpty
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Checks if the value is an empty object, collection, map, or set (objects are considered empty if they have no own enumerable string keyed properties).&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;isEmpty&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lodash/isEmpty&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;isEmpty&lt;/span&gt;&lt;span class="p"&gt;({});&lt;/span&gt;
&lt;span class="c1"&gt;// =&amp;gt; true&lt;/span&gt;

&lt;span class="nf"&gt;isEmpty&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;John Doe&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="c1"&gt;// =&amp;gt; false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  throttle
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Creates a throttled function that only invokes the passed function at most once per every interval, specified in milliseconds.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;throttle&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lodash/throttle&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;throttled&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;throttle&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Throttled after 50ms!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;resize&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;throttled&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  debounce
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Creates a debounced function that delays invoking the passed function until after the specified wait time has elapsed since the last time the debounced function was invoked.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;debounce&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lodash/debounce&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;debounced&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;debounce&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Debounced after 400ms!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;resize&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;debounced&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  merge
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Recursively merges own and inherited enumerable string keyed properties of source objects into the destination object.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;merge&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lodash/merge&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;firstObject&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;A&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;B&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;C&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;secondObject&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;A&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;B&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;D&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;merge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;firstObject&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;secondObject&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// result =&amp;gt; { A: [{ B: 3 }, { C: 2, D: 4 }] }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  cloneDeep
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Creates a deep clone of a specified value.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;cloneDeep&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lodash/cloneDeep&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;items&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Item A&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Item B&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;cloneDeep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// result[0] === items[0] =&amp;gt; false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  startCase
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Converts a string to &lt;a href="https://en.wikipedia.org/wiki/Letter_case#Start_case" rel="noopener noreferrer"&gt;start case&lt;/a&gt; (the first letter of each word capitalized).&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;startCase&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lodash/startCase&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;startCase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;--foo-bar--&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// =&amp;gt; 'Foo Bar'&lt;/span&gt;

&lt;span class="nf"&gt;startCase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fooBar&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// =&amp;gt; 'Foo Bar'&lt;/span&gt;

&lt;span class="nf"&gt;startCase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;__FOO_BAR__&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// =&amp;gt; 'FOO BAR'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  kebabCase
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Converts a string to &lt;a href="https://en.wikipedia.org/wiki/Letter_case#Kebab_case" rel="noopener noreferrer"&gt;kebab case&lt;/a&gt; (punctuation is removed, the text is converted to lowercase, and spaces are replaced by single dashes).&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;kebabCase&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lodash/kebabCase&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;kebabCase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Foo Bar&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// =&amp;gt; 'foo-bar'&lt;/span&gt;

&lt;span class="nf"&gt;kebabCase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fooBar&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// =&amp;gt; 'foo-bar'&lt;/span&gt;

&lt;span class="nf"&gt;kebabCase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;__FOO_BAR__&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// =&amp;gt; 'foo-bar'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  snakeCase
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Converts a string to &lt;a href="https://en.wikipedia.org/wiki/Letter_case#Snake_case" rel="noopener noreferrer"&gt;snake case&lt;/a&gt; (punctuation is removed, the text is converted to lowercase, and spaces are replaced by single underscores).&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;snakeCase&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lodash/snakeCase&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;snakeCase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Foo Bar&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// =&amp;gt; 'foo_bar'&lt;/span&gt;

&lt;span class="nf"&gt;snakeCase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fooBar&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// =&amp;gt; 'foo_bar'&lt;/span&gt;

&lt;span class="nf"&gt;snakeCase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;--FOO-BAR--&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// =&amp;gt; 'foo_bar'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  camelCase
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Converts a string to &lt;a href="https://en.wikipedia.org/wiki/Letter_case#Camel_case" rel="noopener noreferrer"&gt;camel case&lt;/a&gt; (spaces and punctuation are removed and the first letter of each word is capitalized).&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;camelCase&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lodash/camelCase&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;camelCase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Foo Bar&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// =&amp;gt; 'fooBar'&lt;/span&gt;

&lt;span class="nf"&gt;camelCase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;--foo-bar--&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// =&amp;gt; 'fooBar'&lt;/span&gt;

&lt;span class="nf"&gt;camelCase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;__FOO_BAR__&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// =&amp;gt; 'fooBar'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That’s all. Thanks! I hope this can help you the next time you write a JavaScript application. &lt;a href="https://lodash.com" rel="noopener noreferrer"&gt;Lodash&lt;/a&gt; is a very popular open-source library that's worth checking out if you're looking for ways to build web applications faster.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Hey! 👋 My name is Diogo and I'm an enthusiastic frontend developer who is passionate about building for the web. If you want to keep in touch check out &lt;a href="https://diogocapela.com" rel="noopener noreferrer"&gt;my website&lt;/a&gt; or follow me on &lt;a href="https://twitter.com/diogocapela" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>lodash</category>
      <category>opensource</category>
    </item>
    <item>
      <title>How to setup a Node.js app with a custom start and build script on Heroku</title>
      <dc:creator>Diogo Capela</dc:creator>
      <pubDate>Sun, 27 Feb 2022 17:51:46 +0000</pubDate>
      <link>https://forem.com/diogocapela/how-to-setup-a-nodejs-app-with-a-custom-start-and-build-script-on-heroku-1gdd</link>
      <guid>https://forem.com/diogocapela/how-to-setup-a-nodejs-app-with-a-custom-start-and-build-script-on-heroku-1gdd</guid>
      <description>&lt;p&gt;These days, the cloud has made it easier for anybody to launch a website or app. One of those services is Heroku, a platform that allows websites to be deployed on runtimes such as Node.js.&lt;/p&gt;

&lt;p&gt;Heroku allows you to publish your web application with just one click. And if you're familiar with it, then you already know that you can use shell scripts or launch commands in the terminal to deploy your applications to the cloud. But what if you have a specific build or start script that you might want to run solely on Heroku?&lt;/p&gt;

&lt;p&gt;In this article, I will teach you how to set up your Node.js application on Heroku using a build and start script of your choice!&lt;/p&gt;

&lt;h2&gt;
  
  
  Heroku-specific build script
&lt;/h2&gt;

&lt;p&gt;If your app has a build step that you’d like to run when you deploy, you can use a &lt;code&gt;build&lt;/code&gt; script in &lt;code&gt;package.json&lt;/code&gt; (since March 2019, Node.js deployments will automatically execute an app’s &lt;code&gt;build&lt;/code&gt; script during the deployment if one is defined in the app’s &lt;code&gt;package.json&lt;/code&gt; file).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"node index.js"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"webpack"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;will&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;automatically&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;run&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;on&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Heroku&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to define some other script rather than &lt;code&gt;build&lt;/code&gt; to run specifically on Heroku, you can add a &lt;code&gt;heroku-postbuild&lt;/code&gt; to your &lt;code&gt;package.json&lt;/code&gt; scripts, which will run instead of the regular &lt;code&gt;build&lt;/code&gt; script.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"node index.js"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ng build"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;will&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;run&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;on&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Heroku&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"heroku-postbuild"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ng build --prod"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;provided&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;will&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;run&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;instead&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You may also want to run scripts only before or after other Heroku build steps. For instance, you may need to configure npm, git, or ssh before Heroku installs dependencies, or you may need to build production assets after dependencies are installed.&lt;/p&gt;

&lt;p&gt;To achieve these Heroku-specific actions, you can use the following scripts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;heroku-prebuild:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Runs before Heroku installs dependencies.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;heroku-postbuild:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Runs after Heroku installs dependencies (but before pruning and caches dependencies). If this script is specified, the regular build script will not run.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;heroku-cleanup:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Runs after Heroku prunes and caches dependencies.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Heroku-specific start script
&lt;/h2&gt;

&lt;p&gt;By default, Heroku runs &lt;code&gt;npm start&lt;/code&gt; while starting deployed Node.js applications, but if you would like to run some other script from your &lt;code&gt;package.json&lt;/code&gt; instead you just need to follow one simple step.&lt;/p&gt;

&lt;p&gt;Just create a &lt;code&gt;Procfile&lt;/code&gt; at the root of your project with your custom start script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;web: npm run my-custom-start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's it! Now Heroku will run &lt;code&gt;my-custom-start&lt;/code&gt; instead of the regular &lt;code&gt;start&lt;/code&gt; script when you deploy your Node.js app.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"node index.js"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;will&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;run&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;on&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Heroku&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"my-custom-start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"PROD=true node index.js"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;will&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;run&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;instead&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Setting up a Node.js app on Heroku is easy, but still requires some setup to ensure that your app build and starts properly.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;Hopefully, this small guide could help you customize your Heroku app to your specific needs and make your deployment process faster. Thanks!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Hey! 👋 My name is Diogo and I'm an enthusiastic frontend developer who is passionate about building for the web. If you want to keep in touch check out &lt;a href="https://diogocapela.com" rel="noopener noreferrer"&gt;my website&lt;/a&gt; or follow me on &lt;a href="https://twitter.com/diogocapela" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>heroku</category>
      <category>node</category>
      <category>javascript</category>
      <category>npm</category>
    </item>
    <item>
      <title>5 best React UI frameworks to build web applications faster in 2022</title>
      <dc:creator>Diogo Capela</dc:creator>
      <pubDate>Sat, 26 Feb 2022 04:33:07 +0000</pubDate>
      <link>https://forem.com/diogocapela/5-best-react-ui-frameworks-to-build-web-applications-faster-in-2022-48eh</link>
      <guid>https://forem.com/diogocapela/5-best-react-ui-frameworks-to-build-web-applications-faster-in-2022-48eh</guid>
      <description>&lt;p&gt;There are many ways to speed up your development time when building a web application. For example, if you're creating a web app from scratch, you may want to use a framework to make your development faster. However it’s not always easy to find the right framework for your web application - so you'll probably be tempted to try a lot of different options out. Still, just because there are multiple frameworks doesn't mean they're all equal.&lt;/p&gt;

&lt;h2&gt;
  
  
  React UI frameworks and component libraries to look forward in 2022
&lt;/h2&gt;

&lt;p&gt;Here are the 5 frameworks that we’ll cover in this post:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Chakra UI&lt;/li&gt;
&lt;li&gt;Material UI&lt;/li&gt;
&lt;li&gt;React Bootstrap&lt;/li&gt;
&lt;li&gt;Ant Design&lt;/li&gt;
&lt;li&gt;Semantic UI React&lt;/li&gt;
&lt;/ol&gt;



&lt;h2&gt;
  
  
  Chakra UI
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;A simple, modular, and accessible component library&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsu3v01k2a5ry7dcv7a7a.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsu3v01k2a5ry7dcv7a7a.jpg" alt="Chakra UI" width="800" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Chakra UI is a rising open-source library made by &lt;a href="https://twitter.com/thesegunadebayo" rel="noopener noreferrer"&gt;Segun Adebayo&lt;/a&gt; that empowers developers with the building blocks they need to create robust React apps. It is currently my go-to choice when developing new web applications for its simplicity and design. It provides a wide variety of components, it is easily extensible, and it is packaged with some very useful custom hooks. The beauty of Chakra UI is its simplicity and I would recommend it to anyone looking to bootstrap a new web application using React.&lt;/p&gt;

&lt;p&gt;More details at &lt;a href="https://chakra-ui.com" rel="noopener noreferrer"&gt;chakra-ui.com&lt;/a&gt;.&lt;/p&gt;



&lt;h2&gt;
  
  
  Material UI
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;A robust, customizable, and accessible library of foundational and advanced components&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7cajhmipkkz4d0tgz5k2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7cajhmipkkz4d0tgz5k2.jpg" alt="Material UI" width="800" height="233"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Material UI is one of the most popular open-source component frameworks in the React ecosystem. It is maintained by a group of invaluable contributors, with the massive support and involvement of the community. It offers numerous quality components on its base package, which are free to use and MIT licensed on their community edition. However, some components such as the Data Grid and the Date Ranger Picker have some features locked behind their MUI X Pro package which gets you more components and professional support. Nevertheless, Material UI is still a great choice if you are looking for something powerful, flexible, and that most users are familiar with.&lt;/p&gt;

&lt;p&gt;More details at &lt;a href="https://mui.com" rel="noopener noreferrer"&gt;mui.com&lt;/a&gt;.&lt;/p&gt;



&lt;h2&gt;
  
  
  React Bootstrap
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;The most popular front-end framework, rebuilt for React&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyjyvqwqxdvsxpwnl7xgl.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyjyvqwqxdvsxpwnl7xgl.jpg" alt="React Bootstrap" width="800" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Originally named Twitter Blueprint, Bootstrap needs no introduction as it is one of the most popular front-end component libraries. It was made by &lt;a href="https://twitter.com/mdo" rel="noopener noreferrer"&gt;@mdo&lt;/a&gt; and &lt;a href="https://twitter.com/fat" rel="noopener noreferrer"&gt;@fat&lt;/a&gt; as a framework to encourage consistency across internal projects at Twitter. React Bootstrap is a wrapper around the original Bootstrap framework which provides most of the components built from scratch as a true React component.&lt;/p&gt;

&lt;p&gt;More details at &lt;a href="https://react-bootstrap.github.io" rel="noopener noreferrer"&gt;react-bootstrap.github.io&lt;/a&gt;.&lt;/p&gt;



&lt;h2&gt;
  
  
  Ant Design
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;A design system for enterprise-level products&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvp48gidibp8dws8ycjxl.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvp48gidibp8dws8ycjxl.jpg" alt="Ant Design" width="800" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ant Design has a React UI library that contains a set of high-quality enterprise-class components for building rich, interactive user interfaces. It is written in TypeScript with predictable static types, internationalization support for dozens of languages, and offers powerful theme customization. &lt;a href="https://xtech.antfin.com" rel="noopener noreferrer"&gt;XTech&lt;/a&gt; had two main goals for this project: build components with a superior design and make the process of developing for the web more accessible for the developers. It is a great choice if you need a complex set of components and it has the support of big brands like Alibaba, Tencent, and Baidu.&lt;/p&gt;

&lt;p&gt;More details at &lt;a href="https://ant.design" rel="noopener noreferrer"&gt;ant.design&lt;/a&gt;.&lt;/p&gt;



&lt;h2&gt;
  
  
  Semantic UI React
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;A development framework that helps create beautiful responsive layouts&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0urofimh0vv76cmmn1nm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0urofimh0vv76cmmn1nm.jpg" alt="Semantic UI React" width="800" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Semantic UI React is a jQuery-free integration of the original Semantic UI framework. It uses a unique design that has a declarative API adapted to React. It offers over 50 different components which are very easy to integrate into your project. The only negative aspect I noticed is that some components can be not so easily customizable. Anyway, it is still a solid choice with lots of options for most web applications.&lt;/p&gt;

&lt;p&gt;More details at &lt;a href="https://react.semantic-ui.com" rel="noopener noreferrer"&gt;react.semantic-ui.com&lt;/a&gt;.&lt;/p&gt;



&lt;blockquote&gt;
&lt;p&gt;UI frameworks allow to build web applications with less code and much faster. They are flexible and easy to use, so it doesn't matter whether you are a professional or beginner in the React world, these frameworks will defiantly help you get started with creating your web application.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>frontend</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
