<?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: Kafui Alordo</title>
    <description>The latest articles on DEV Community by Kafui Alordo (@kafui4k).</description>
    <link>https://dev.to/kafui4k</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%2F258513%2F39a28d8f-98ee-4fbb-8ca7-90acf1ff4b0d.jpg</url>
      <title>DEV Community: Kafui Alordo</title>
      <link>https://dev.to/kafui4k</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kafui4k"/>
    <language>en</language>
    <item>
      <title>Why the Composition API?</title>
      <dc:creator>Kafui Alordo</dc:creator>
      <pubDate>Mon, 02 Jan 2023 11:43:57 +0000</pubDate>
      <link>https://dev.to/kafui4k/why-the-composition-api-2pnp</link>
      <guid>https://dev.to/kafui4k/why-the-composition-api-2pnp</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;A short but concise note on why it is called or referred to as an Options API when you are torn apart on which of them to use.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Before we continue,  note that the Composition API however is not meant to replace the Options API completely but rather, purely additive and only an alternative syntax for writing components in Vue.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;They perform the same function&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;and can both be used concurrently in the same project.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://blog.vuejs.org/posts/vue-3-as-the-new-default.html" rel="noopener noreferrer"&gt;Vue 3&lt;/a&gt;&lt;/strong&gt; is introduced as the New Default&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  But why was it introduced?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. TypeScript Support&lt;/strong&gt;&lt;br&gt;
If you're gonna use TypeScript out of the box, then you are sure to leverage the Composition API instead.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Better Organization&lt;/strong&gt;&lt;br&gt;
Composition API provides better code layout and organization for our components than the Options API, if you're working on a more larger project.&lt;br&gt;
remember the Composition API uses the setup() hook.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Better reusability&lt;/strong&gt;&lt;br&gt;
The Composition API offers a better code reusability than the mixins alternative the options API offers to handle the same logic. You can checkout &lt;a href="https://vuejs.org/api/options-composition.html#mixins" rel="noopener noreferrer"&gt;mixins &lt;/a&gt;if you aren't familiar with it yet.&lt;/p&gt;

&lt;p&gt;And that is it,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Though the Options API is completely optional, it can/or cannot be used per your preference and expert experience in writing Vue applications.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But I will advice as well to know how to use more the Options API by heart, so you better know when you're confident to go full Composition API in your next big project to clear any before doubts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy Coding, Happy New Year!!!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>emptystring</category>
    </item>
    <item>
      <title>Replicating Expensify.com in Next.Js</title>
      <dc:creator>Kafui Alordo</dc:creator>
      <pubDate>Thu, 27 Oct 2022 13:08:22 +0000</pubDate>
      <link>https://dev.to/kafui4k/replicating-expensifycom-in-nextjs-5eab</link>
      <guid>https://dev.to/kafui4k/replicating-expensifycom-in-nextjs-5eab</guid>
      <description>&lt;h3&gt;
  
  
  Disclaimer:
&lt;/h3&gt;

&lt;p&gt;This is not yet another &lt;em&gt;How-to&lt;/em&gt; guide but to share with you the project am currently working on from the ground up in &lt;a href="https://nextjs.org/"&gt;Next.Js&lt;/a&gt; - a framework I have discovered recently so I can quickly implement the different shiny stuffs that it has to offer and understanding its ecosystem.&lt;/p&gt;

&lt;p&gt;Though &lt;em&gt;Still a work in progress&lt;/em&gt;, &lt;u&gt;You can clone and contribute to the code here&lt;/u&gt; &lt;a href="https://github.com/kafui4k/next-expense"&gt;next-expense&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;the Stacks&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React&lt;/li&gt;
&lt;li&gt;Next.Js&lt;/li&gt;
&lt;li&gt;MUI&lt;/li&gt;
&lt;li&gt;Magic Auth&lt;/li&gt;
&lt;li&gt;Airtable&lt;/li&gt;
&lt;li&gt;JavaScript&lt;/li&gt;
&lt;li&gt;TypeScript&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Quite recently I have chanced upon Next.Js barely two months ago when I was contributing to a commercial product for a client - a mobile first web application built entirely in Next.Js - &lt;em&gt;front-to-backend&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;I presume you're already familiar with the Reacct/Js ecosystem of building application, if you're not, you can checkout the React docs here &lt;a href="https://reactjs.org/docs/getting-started.html"&gt;getting started with react&lt;/a&gt; to familiarize yourself. Even though it is claimed you don't need much react to get started with Next.Js - but you definitely need it.&lt;/p&gt;

&lt;p&gt;I was fascinated about the framework which preached the gospel according their website:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjdb9h9pz8p0t4g3pba22.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjdb9h9pz8p0t4g3pba22.PNG" alt="Next-js-image-screenshot" width="800" height="227"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I quickly glanced at the docs, and played with the demo tutorial to quickly get started.&lt;/p&gt;

&lt;p&gt;That wasnt enough so I decided to scout some resource more - and chanced upon a full stack implementation of Next.Js to build a Nextflix-like clone. Code here as well &lt;a href="https://github.com/kafui4k/next-flix"&gt;next-flix&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fast forward having come from a React background, I want to go a step further in applying my skills to other concepts and implementing more complex systems with differentiate kind of approach. I must say I like the abstraction Next.Js has to offer in terms &lt;em&gt;routing&lt;/em&gt;, &lt;em&gt;image handling and optimizations&lt;/em&gt;, &lt;em&gt;in-built optional api&lt;/em&gt; right out of the box during project scaffold, the different _rendering _- (ssr, isr, csr) techniques for data manipulation and fetching.&lt;/p&gt;

&lt;p&gt;But I was thorn between what I could build with this new found technology and skill I just acquired.&lt;/p&gt;

&lt;p&gt;I brainstormed and alas! I decided to replicate as seemly as possible one of my favorite products I began using this year in the same time frame as I have come to found Next.Js - &lt;a href="https://www.expensify.com/"&gt;Expensify&lt;/a&gt;- an Expense Tracker.&lt;/p&gt;

&lt;h2&gt;
  
  
  Note:
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;this is not an ad but it's by far what I have come in to terms with to build, so I could learn the nitty gritty of the Next.Js framework and what it has to offer and how I can leverage that into other similar projects going forward.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Because the app is already a production one, I didn't have to bother so much on design. Thus I referenced the app as my design guide. &lt;/p&gt;

&lt;h2&gt;
  
  
  The First Steps:
&lt;/h2&gt;

&lt;p&gt;I quickly set up the project scaffold in the getting started section&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhtk3mvj3cul7zelnzcrc.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhtk3mvj3cul7zelnzcrc.PNG" alt="setup-next-js-project-commands" width="745" height="366"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then I built the Login page UI - to implementing the AUTH process before anything else.&lt;/p&gt;

&lt;p&gt;I didnt want to complicate anything since the main goal is using Next.Js to quickly prototype or build out a fullstack application.&lt;br&gt;
So I leverage the &lt;strong&gt;Magic&lt;/strong&gt; &lt;em&gt;Auth&lt;/em&gt; platform to handle user authentication for me during login. I read there is &lt;strong&gt;next-auth&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq0t74rtarkmkcorn19c0.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq0t74rtarkmkcorn19c0.PNG" alt="next-auth" width="800" height="268"&gt;&lt;/a&gt; - which am going to look into next and see how I can leverage that as well in the same project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next up,
&lt;/h2&gt;

&lt;p&gt;is building out the dashboard after a successful user login and redirect to the dashboard. Still using the already built production app as a design guide, I quickly setout to implement the UI first with a dummy data, as this is basically my approach to building out stuffs' as quickly as possible as I can before leveraging dynamic data. Some components has to do with a &lt;strong&gt;sidebar&lt;/strong&gt;, &lt;strong&gt;header&lt;/strong&gt; which display dynamic data based on the navigation items selected - of which I handle perfectly with React &lt;em&gt;useState&lt;/em&gt;. The first major thing to implement afterwards was to build the modal that handle the &lt;strong&gt;C&lt;/strong&gt; aspect of &lt;em&gt;CRUD&lt;/em&gt; - and this means I will need a database of sort to store my data - so I leverage on &lt;em&gt;Airtable&lt;/em&gt; to handle this for me since am also new to Airtable and want to take advantage of this to learn about it as well.&lt;/p&gt;

&lt;p&gt;Setting up Airtable was quite straight forward but with a little reading here and there and some figuring outs to do, since its a new technology to me.&lt;/p&gt;

&lt;h2&gt;
  
  
  The other steps:
&lt;/h2&gt;

&lt;p&gt;I would need to build a &lt;strong&gt;user&lt;/strong&gt; table in Airtable to handle individual users on the app, so when they perform CRUD functions, they will interact only with their data based on their Id's - which am looking forward to using JWT in the process to provide a unique token for each logged in user.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;use redux, specifically rtk query to manage application-wide state&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;add relational database with GraphQL&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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