<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: akinloludavid</title>
    <description>The latest articles on DEV Community by akinloludavid (@akinloludavid).</description>
    <link>https://dev.to/akinloludavid</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%2F628788%2F7366045a-8787-4537-8b77-f269db0c64f6.png</url>
      <title>DEV Community: akinloludavid</title>
      <link>https://dev.to/akinloludavid</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/akinloludavid"/>
    <language>en</language>
    <item>
      <title>How I reduced my app size from 14mb to 600kb</title>
      <dc:creator>akinloludavid</dc:creator>
      <pubDate>Fri, 06 Sep 2024 20:37:09 +0000</pubDate>
      <link>https://dev.to/akinloludavid/devtool-is-not-necessary-535n</link>
      <guid>https://dev.to/akinloludavid/devtool-is-not-necessary-535n</guid>
      <description>&lt;p&gt;I was working on a frontend project some months ago. The project was a microfrontend that was meant to be integrated on a legacy dashboard. &lt;/p&gt;

&lt;p&gt;The reason for the microfrontend approach was to reduce the complexity on the dashboard. I was excited at this challenge and I plunged into it.&lt;/p&gt;

&lt;p&gt;I setup the microfrontend using webpack, react and typescript. I used chakra ui as the CSS-IN-JS framework, axios for API integration and everything worked fine. However, the build size of the project was about 14mb. For a microfrontend, that was ridiculously large. This led to a very slow page response in the dashboard where it was integrated. So I was presented with a new challenge to optimize the build.&lt;/p&gt;

&lt;p&gt;I thought the build was that large because I used a CSS-IN-JS framework for the styling. So I refactored the entire codebase from chakra-ui to sass. Guess what, the build size increased from 14mb to about 21mb 😂😂. &lt;/p&gt;

&lt;p&gt;That was when I knew that the issue is not about the css library or the code but about the webpack config. I started a lot of trial and error with the webpack config. I then discovered that when I removed the devtool, the build size went from 14mb to about 600kb. Then I checked the webpack documentation about devtool. I realized it is not compulsory. More info &lt;a href="https://webpack.js.org/configuration/devtool/#root" rel="noopener noreferrer"&gt;here:&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here's a sneak peek into my webpack config&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module.exports = merge(common, {
  name: "client",
  mode: process.env.NODE_ENV,
  devtool: "eval-source-map", //remove devtool
  entry: {
    "microfrontend": "./src/bootstrap.tsx",
  },
  output: {
    path: path.resolve(__dirname, "../dist"),
    filename: "[name]_[hash].js",
    pathinfo: false,
    publicPath: 'http://localhost:6001/',
  },
  ...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In summary, the solution to the problem I encountered was fixed by just removing one line of code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module.exports = merge(common, {
  name: "client",
  mode: process.env.NODE_ENV,
  entry: {
    "microfrontend": "./src/bootstrap.tsx",
  },
  output: {
    path: path.resolve(__dirname, "../dist"),
    filename: "[name]_[hash].js",
    pathinfo: false,
    publicPath: 'http://localhost:6001/',
  },
  ...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thanks for reading. I hope you find this helpful.&lt;/p&gt;

</description>
      <category>webpack</category>
      <category>react</category>
      <category>javascript</category>
      <category>microfrontend</category>
    </item>
    <item>
      <title>The CSS frameworks you should know.</title>
      <dc:creator>akinloludavid</dc:creator>
      <pubDate>Sat, 13 Nov 2021 18:10:49 +0000</pubDate>
      <link>https://dev.to/akinloludavid/the-css-frameworks-you-should-know-ek5</link>
      <guid>https://dev.to/akinloludavid/the-css-frameworks-you-should-know-ek5</guid>
      <description>&lt;p&gt;Firstly, what is a framework? A framework is essentially a platform that allows developers to build things faster. Here are some key things to know about frameworks in general&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A framework allows you to build softwares without having to code from scratch. &lt;/li&gt;
&lt;li&gt;It is basically a pre-written program that you can build upon as a developer. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most programming languages have their own framework (Javascript especially) but for this post, we would be learning about CSS frameworks.&lt;/p&gt;

&lt;p&gt;Writing plain CSS while building a small web project can be fun. However when the application becomes bigger and more sophisticated, plain CSS can be extremely stressful. Your best bet would to use a CSS framework. Here are some advantages of using CSS frameworks.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Faster development &lt;/li&gt;
&lt;li&gt;Cross browser functionality&lt;/li&gt;
&lt;li&gt;Enforces standard web design patterns and styles.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are many CSS frameworks out there, however in this post I have curated top 5 CSS frameworks to learn in 2021.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Bootstrap&lt;/strong&gt; - &lt;a href="https://getbootstrap.com/"&gt;Bootstrap&lt;/a&gt; is the most popular HTML, CSS and Javascript framework for developing nice looking websites that are responsive and mobile friendly. Bootstrap comes with it's own components like navbar, carousel, buttons etc. It was developed by twitter in 2011 and it is currently in version 5. You can visit bootstrap official website  to learn more. Their documentation is very explanatory. Top companies like twitter, walmart use bootstrap for their web applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tailwind&lt;/strong&gt; - &lt;a href="https://tailwindcss.com/"&gt;Tailwind&lt;/a&gt; is a utility-first CSS framework. Unlike other CSS framework that come with their pre-defined components, Tailwind enables you to create your own bespoke designs easily. Top companies like hashnode, livestorm, Superchat, Hubblr use Tailwind css.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Foundation&lt;/strong&gt; - &lt;a href="https://get.foundation/"&gt;Foundation&lt;/a&gt; is also a very advanced CSS framework that comes with a bunch of in-built components and also some animations. It is highly responsive design and mobile friendly. Accenture, Nubank are companies that use foundation. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Bulma CSS&lt;/strong&gt; &lt;a href="https://bulma.io/"&gt;Bulma&lt;/a&gt; - is a CSS framework based on CSS flexbox. It also has a lot of in-built components that you can use. One distinct feature of Bulma is that it comes in a lightweight weight structure that allows you to only import the components you need. Companies like Django, Rubrik used Bulma CSS&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Materialize CSS&lt;/strong&gt; &lt;a href="https://materializecss.com/"&gt;Materialize&lt;/a&gt; is a CSS framework developed by Google with HTML, CSS and Javascript. It contains a lot of engaging components that can accelerate frontend development and enhance user experience. It is also known as Material Design.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;NB: There are a bunch of other CSS frameworks out there like Purecss, skeleton, ant design etc. This article is just to show you some of the most relevant ones. Also, you don't have to know everything. Knowing one or two is fine. You can always pick up others to learn if a project demands it. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;You should have a considerable understanding of CSS before you start learning any framework&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you find this article helpful, kindly let me know in the comment and don't forget to like.✌🏾&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Dealing with Bugs as a Novice Frontend Developer</title>
      <dc:creator>akinloludavid</dc:creator>
      <pubDate>Wed, 10 Nov 2021 23:58:21 +0000</pubDate>
      <link>https://dev.to/akinloludavid/dealing-with-bugs-as-a-novice-frontend-developer-51j6</link>
      <guid>https://dev.to/akinloludavid/dealing-with-bugs-as-a-novice-frontend-developer-51j6</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;If debugging is the process of removing software bugs, then programming must be the process of putting them in. - Edsger Dijkstra&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is just a funny quote I grabbed from &lt;a href="https://www.quotemaster.org/software+bugs"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A bug is simply an error that is making a computer program misbehave. &lt;/p&gt;

&lt;p&gt;Learning frontend development can be quite fun (when your code is working the exact way you want) but often times, it just doesn't work that way. You are bound to face bugs at some point in your learning journey. Even Senior Developers encounter bugs so who are you😂. &lt;/p&gt;

&lt;p&gt;As a newbie, bugs can frustrate you to the extent that you might just want to quit coding but the point is that is how you will learn. &lt;/p&gt;

&lt;p&gt;So here are a few things you can do when you face bugs&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Use Google - All programmers actually use google. If you are getting an error message of some kind, you can just copy the error message and paste it on google. There is a 100% chance that someone has faced the same problem you are facing and another person has provided the solution to the problem. The trick is that using google can be overwhelming because you get a lot of search results.So as a frontend developer, when you use google to debug, there are some likely websites you can get your solutions from &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;stackoverflow.com&lt;/li&gt;
&lt;li&gt;w3schools.com&lt;/li&gt;
&lt;li&gt;developer.mozilla.org (MDN)&lt;/li&gt;
&lt;li&gt;dev.to &lt;/li&gt;
&lt;li&gt;medium.com etc&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Ask a senior colleague - This is probably the fastest way to fix a bug because you are asking a real person that has probably faced the same issue you are facing. Although, this can be a little difficult because most people self-learn. A quick fix to this would be to join coding communities so you can learn with other developers. Examples of some coding communities you can join include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;stack overflow, &lt;/li&gt;
&lt;li&gt;women who code, &lt;/li&gt;
&lt;li&gt;freecodecamp, &lt;/li&gt;
&lt;li&gt;hashnode etc. &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Thanks for reading. I wish you the best in your learning journey. Kindly let me know your thoughts in the comments section. You can also subscribe to my posts if this actually helped you. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>html</category>
      <category>codenewbie</category>
    </item>
  </channel>
</rss>
