<?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: DAVID IKUKOYI</title>
    <description>The latest articles on Forem by DAVID IKUKOYI (@davidblaqq).</description>
    <link>https://forem.com/davidblaqq</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%2F649274%2F4181606a-1d4b-4dfe-ae20-1fb0c4e47f51.png</url>
      <title>Forem: DAVID IKUKOYI</title>
      <link>https://forem.com/davidblaqq</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/davidblaqq"/>
    <language>en</language>
    <item>
      <title>React Notes app with firebase authentication and storage</title>
      <dc:creator>DAVID IKUKOYI</dc:creator>
      <pubDate>Thu, 17 Nov 2022 21:04:33 +0000</pubDate>
      <link>https://forem.com/davidblaqq/react-notes-app-with-firebase-authentication-and-storage-262e</link>
      <guid>https://forem.com/davidblaqq/react-notes-app-with-firebase-authentication-and-storage-262e</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;This tutorial is going to be a guide on how to create a simple notes application also provided with firebase authentication. This topic covers basic essential concepts like prop drilling, state hooks and javascript higher order functions like the map and filter. Though a simple and basic app, I particularly picked this project because it tends to cover many basic features for beginners and experts and also treats the firebase authentication with google sign up. Understanding this tutorial will help you solve any mundane task that could come your way. I advise that you practise this course which you can also add to your portfolio. I will be discussing more of functionality than styling. You can fork or copy the app in my github repo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating react notes application
&lt;/h2&gt;

&lt;p&gt;To start this project, run &lt;code&gt;npx create-react-app appname&lt;/code&gt;. I talked about how to install react on your pc &lt;a href="https://afobaje.hashnode.dev/introduction-to-react#heading-how-to-install-react"&gt;here&lt;/a&gt;. Another essential tool for this development is tailwind for our styling, to install it, run these commands simultaneously&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -D tailwindcss
npx tailwindcss init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tailwind provides an intuitive documentation on how to set it up &lt;a href="https://tailwindcss.com/docs/installation"&gt;here&lt;/a&gt;. The last tool for this project is the firebase, to install it, run &lt;code&gt;npm i firebase&lt;/code&gt; and we are set to build a notes application. I am very excited for the next phase.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuring firebase
&lt;/h2&gt;

&lt;p&gt;After installing firebase, we have little configurations to create on the &lt;a href="https://firebase.google.com/"&gt;website&lt;/a&gt;. To start, firebase requires that we create a project on the website, I will call this &lt;code&gt;react-todoapp&lt;/code&gt;, after registering the app, you are immediately provided with a config file, this is the basis file for building our firebase auth, in the src folder, I will be creating a services folder and firebase.js file where I will copy the configuration file, this config file can also be added directly to your app.js, it all depends on preference. I will also import some packages to this file and initialize my auth before exporting it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { initializeApp } from "firebase/app";

import {getAuth} from 'firebase/auth'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are firebase packages for initializing auth, the full file looks like this,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { initializeApp } from "firebase/app";

import {getAuth} from 'firebase/auth'

const firebaseConfig = {

    apiKey: process.env.APIKEY,
    authDomain: process.env.AUTHDOMAIN,
    projectId: process.env.PROJECTID,
    storageBucket: process.env.STORAGEBUCKET,
    messagingSenderId: process.env.MESSAGINGSENDERIS,
    appId: process.env.APPID,
    measurementId: process.env.MEASUREMENTID,

  };



  const firebaseApp = initializeApp(firebaseConfig);

  export const auth = getAuth(firebaseApp);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With the package I imported, I initialized my config and exported it, this will be useful in authentication going forward.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating application logic
&lt;/h2&gt;

&lt;p&gt;A notes application is basically  a list of notes displayed in a stack of items and arranged accordingly, to create this, I will be using an array, array in javascript has powerful functions to help create this application.&lt;br&gt;
With the use of the useState hook, I will create a listItems state where each notes will be added to display to user&lt;br&gt;
To use the useState hook, we start with importing the useState hook&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import {useState} from 'react'

let [listItems,setListItems]=useState([])
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The useState hook uses a destructuring method to access and set items, the listItems is the array and the setListItems is the setter, I mentioned in my post &lt;a href="https://afobaje.hashnode.dev/introduction-to-react"&gt;here&lt;/a&gt; that react treats data as immutable. we will explore more on this as we move on.&lt;br&gt;
Since this is a note app, it will be nice for us to be able to see our recorded notes on a later date logging in to the platform, to persist data on this app, we will be using the localStorage API to keep our data local to that particular browser so that we can access it when going back to the website.&lt;/p&gt;
&lt;h3&gt;
  
  
  Note
&lt;/h3&gt;

&lt;p&gt;Firebase provides a store function called firestore but we will not be exploring it here&lt;/p&gt;
&lt;h3&gt;
  
  
  localStorage API
&lt;/h3&gt;

&lt;p&gt;The localstorage is a browser API that allows you to use browser storage to store files with get and set methods&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;localStorage.setItem(itemName,item)- // for adding a string to the API, it requires a name for setting and retrieving item;
localStorage.getItem(itemName)- // for getting stored items;
localStorage.removeItem(itemName)- // for deleting an initial stored item

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, the API stores only strings which leads us to using Json methods, &lt;code&gt;JSON.stringify()&lt;/code&gt;  to convert our arrays to strings and &lt;code&gt;JSON.parse()&lt;/code&gt; to   retrieve them from string methods.&lt;br&gt;
The useState hook basically accepts a function as long as it returns a value&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import {useEffect,useState} from 'react'

function App(){
let store=localStorage.getItem('Todo')
let [listItems,setListItems]=useState(()=&amp;gt;{
if(store){
return store;
} else {
return [];
}
});

useEffect(()=&amp;gt;{
localStorage.setItem('Todo',JSON.stringify(listItems))
})

return (
&amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;
)
};

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This method is basically means that on initialization get the &lt;code&gt;Todo&lt;/code&gt; property from localStorage then on the useState hook, if the store from the todo property is available, initialize it as the array else set an empty array.&lt;/p&gt;

&lt;p&gt;With these methods set in place, we basically have a basic front end CRUD app, we can return a list item with the use of map. The map function is a higher order function that helps transform an array and returns another array. I will write more on this in the future.&lt;br&gt;
A major challenge I noticed is that newbie devs don't know how to return values, I also faced this challenge, when using map, to return  an item is something like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;listItems.map((val)=&amp;gt;&amp;lt;li&amp;gt;{val}&amp;lt;li&amp;gt;)
or
listItems.map((val)=&amp;gt;(
&amp;lt;li&amp;gt;{val}&amp;lt;li&amp;gt;
))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will work because arrow functions has an implicit return and the second method also works. Another majorly used method is this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;listItems.map(val=&amp;gt;{
return (&amp;lt;div&amp;gt;{val}&amp;lt;/div&amp;gt;)
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because of the bracket, I have to return a value hence this one. Moving on to the project ;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return (
&amp;lt;div&amp;gt;
{
listItems.map((val,i)=&amp;gt;{
return (
    &amp;lt;div className="items flex justify-evenly p-4 border-slate-300 border w-fit rounded-md mt-2 shadow-md dark:shadow-sm dark:shadow-white" key={i}&amp;gt;
    &amp;lt;div className="w-11/12 mr-4 dark:text-white leading-6"&amp;gt;
                    {val}
                  &amp;lt;/div&amp;gt;
                  &amp;lt;button className=" p-1 rounded-md"
                    onClick={() =&amp;gt; {
                      setListItems(listItems.filter((val, id) =&amp;gt; i !== id));
                    }}&amp;gt;
                    &amp;lt;MdDelete className="dark:text-white" /&amp;gt;
                  &amp;lt;/button&amp;gt;
                &amp;lt;/div&amp;gt;
)
})
}
&amp;lt;/div&amp;gt;
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is all there is to the note app, the classes there are tailwind classes. I added a method to the button. This method is meant to delete unwanted notes from our note app however this method may seem unconventional, to carry out an operation like this, we are supposed to have an array of objects with an incrementing or unique ID for tracking our items&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;listItems.filter((val,id)=&amp;gt;i!==id)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This method filters id crosschecking id from our mapped array thereby giving us a new array so we set this new array to the listItems&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;setListItems(listItems.filter((val, id) =&amp;gt; i !== id));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We need to create a modal for an input element to add notes to this app. This part can be a bit confusing as it involves prop drilling, to create the modal, we are creating a new component called the &lt;code&gt;Modal.jsx&lt;/code&gt;. Prop drilling is basically passing data from a component to another component.&lt;/p&gt;

&lt;p&gt;I will drop the component for the modal here&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useState } from "react";

import { VscChromeClose } from "react-icons/vsc";





const Modal = ({ show, onChange,onClose }) =&amp;gt; {
  let [inputValue, setInputValue] = useState("");
  let handleData = (e) =&amp;gt; setInputValue(e.currentTarget.value);
  return (
    &amp;lt;div
      className={`p-10 shadow-sm dark:shadow-white dark:shadow-sm rounded-lg z-30 dark:bg-slate-600 shadow-black md:overflow-y-auto h-80 max-h-96 blur-none bg-white  flex m-auto fixed  md:left-72 top-28 left-16 w-3/4 md:w-2/4 ${

        show ? "block" : "hidden"

      }`}

    &amp;gt;

      &amp;lt;div className="w-full"&amp;gt;

        &amp;lt;div className="header flex justify-center relative"&amp;gt;

          &amp;lt;h2 className="font-bold dark:text-white"&amp;gt;Add an Item&amp;lt;/h2&amp;gt;

          &amp;lt;button className="absolute right-0 hover:bg-red-300 rounded-full p-2 hover:text-white" onClick={onClose}&amp;gt;&amp;lt;VscChromeClose className="dark:text-white" /&amp;gt;&amp;lt;/button&amp;gt;

        &amp;lt;/div&amp;gt;
        &amp;lt;main className=" p-6 mt-6 flex flex-col relative h-3/4"&amp;gt;
          &amp;lt;div className="h-3/4 w-11/12 m-auto "&amp;gt;
          &amp;lt;input
            type="text"
            name=""
            id=""
            placeholder="What's happening?"
            onChange={(e) =&amp;gt; handleData(e)}
            value={inputValue}
            className="outline-none pl-4 text-start dark:bg-slate-500 dark:text-white rounded-md w-full h-3/4"
          /&amp;gt;
          &amp;lt;/div&amp;gt;
          &amp;lt;div className="absolute md:bottom-0 top-40 md:left-96"&amp;gt;
            &amp;lt;button
            className="p-4 text-white font-bold bg-blue-400 rounded-3xl dark:text-gray-200"
              onClick={() =&amp;gt; {
              if (inputValue.length!==0) {
                  onChange(inputValue);
                  setInputValue("");
                }
              }}
            &amp;gt;
              Post Item
            &amp;lt;/button&amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/main&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  );
};

export default Modal;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With the use of state, we set our input value to state then pass a method to the button that passes this data to the parent component.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; let [inputValue, setInputValue] = useState("");
  let handleData = (e) =&amp;gt; setInputValue(e.currentTarget.value);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;handleData&lt;/code&gt; is added to the onChange method of the input value then we create a method for the submit button&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; onClick={() =&amp;gt; {
              if (inputValue.length!==0) {
                  onChange(inputValue);
                  setInputValue("");
                }
              }}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means that if our inputvalue state's length is not 0, execute this method, we then invoke the &lt;code&gt;onChange&lt;/code&gt; and setInputValue to string , this is different from the onchange event listener, this is a prop passed from the App parent component like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Modal show={show} onChange={handleChange} onClose={closeToggle} /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The method handleChange was passed as a prop to the modal component. The handleChange method passes the data from the inputValue state to the listItems state with the rest method&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; let handleChange = (e) =&amp;gt; {
    setListItems([...listItems, e]);
    setShow(!show);
  };
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The setShow method is responsible for toggling the modal with the closeToggle method&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; let closeToggle = () =&amp;gt; setShow(!show);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Authentication
&lt;/h3&gt;

&lt;p&gt;To authenticate this app, we will be using firebase which will setup earlier, firebase provides a rich amount of authentication methods to draw from, we will be using google auth for this project, firebase as different methods for this, we will be using signInWithPopup method.&lt;/p&gt;

&lt;p&gt;We import some methods first and also import our auth config file we set up initially&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { signInWithPopup, GoogleAuthProvider } from "firebase/auth";
import { auth } from "./services/firebase";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then we create a signIn button that stands as a wall to accessing our notes application&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let signInWithGoogle = () =&amp;gt; {
    signInWithPopup(auth, provider)
      .then((result) =&amp;gt; {
        const user = result.user;
        setVerifiedUser(user);
      })
      .catch((error) =&amp;gt; {
        const errorCode = error.code;
        console.log(error, errorCode);
      });
  };
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The signInWithPopup returns a promise which we can attach then and catch methods, we set the result gotten to a state hook, &lt;code&gt;setVerifiedUser(result)&lt;/code&gt; . To create the wall, we use an if statement which checks if the verifieduser user is available&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; if (!verifiedUser) {
    return (
      &amp;lt;div className="w-screen p-4 justify-center content-center flex h-screen"&amp;gt;
        &amp;lt;div className="w-11/12 flex flex-col justify-center content-center"&amp;gt;
          &amp;lt;div className="w-full p-4 h-2/3 flex content-center justify-center"&amp;gt;
            &amp;lt;div className="max-w-[80%] m-auto h-full"&amp;gt;
            &amp;lt;img src={Man} alt="" className="w-full" /&amp;gt;
            &amp;lt;/div&amp;gt;
          &amp;lt;/div&amp;gt;
          &amp;lt;div className="flex flex-col justify-center content-center"&amp;gt;
            &amp;lt;h1 className="font-bold text-center text-xl mb-4"&amp;gt;The Notepad&amp;lt;/h1&amp;gt;
            &amp;lt;button
              className="p-4 text-white w-32 rounded-lg capitalize self-center text-center bg-blue-500 font-bold"
              onClick={() =&amp;gt; signInWithGoogle()}&amp;gt;
              get started
            &amp;lt;/button&amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    );
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This whole process works in localhost but when deployed, firebase requires that you add your website address to the accessibility settings in your console for firebase.&lt;/p&gt;

&lt;p&gt;Firebase returns some methods like the photoURL, displayName, emailId among other methods which you can plug to your app. I used the photoURL and displayName in this app. You can explore it how you like&lt;/p&gt;

&lt;p&gt;Firebase also provides a hook to do all the background work for you&lt;/p&gt;

&lt;p&gt;First we install firebase-hooks&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i firebase-hooks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then we import this and add some methods, the hooks provide a loading state, error,signIn method and user state&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
 import { useSignInWithGoogle } from "react-firebase-hooks/auth";
const [signInWithGoogle, user, loading, error] = useSignInWithGoogle(auth);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This is also all we need to deploy firebase to our app.&lt;/p&gt;

&lt;p&gt;This is all to creating a note authenticated app. The full repo is &lt;a href="https://github.com/afobaje/react-todoapp"&gt;here&lt;/a&gt; and also the hosted project is &lt;a href="https://afobaje.github.io/react-todoapp/"&gt;here&lt;/a&gt;. &lt;br&gt;
I will be glad to get your feedback and difficulties from this course in the comments. Also, do one better, make a note app and show it off here.&lt;/p&gt;

&lt;p&gt;Recently, there has been a trend of bad news in the tech industry which is leaving many people in doubt. I have cause to tell you not to fear, the only thing to consider is continous self improvement which I am here to help you with, the market always adjust itself and this is one of those days, people are still getting good jobs now.&lt;/p&gt;

</description>
      <category>firebase</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>react</category>
    </item>
    <item>
      <title>Life as a junior developer</title>
      <dc:creator>DAVID IKUKOYI</dc:creator>
      <pubDate>Mon, 04 Jul 2022 09:17:19 +0000</pubDate>
      <link>https://forem.com/davidblaqq/life-as-a-junior-developer-ec2</link>
      <guid>https://forem.com/davidblaqq/life-as-a-junior-developer-ec2</guid>
      <description>&lt;p&gt;Tech is the new money. Tech changed my life. Tech can be learnt with a guaranteed job under three months. Tech gives you freedom of time.&lt;/p&gt;

&lt;p&gt;Those are the various half baked truth sold to new comers (muggles) to convince them to go into tech. As a junior developer, many people continue to go in circles  in their first month trying to decrypt different concepts and patterns completely strange to them.&lt;/p&gt;

&lt;p&gt;A major issue with many people now is that they got convinced through the media so there is no personal guide to hold their hands. As a new developer, you need a personal guide to direct you on the correct steps in other to do anything meaningful otherwise you will be stuck in tutorial land.&lt;/p&gt;

&lt;p&gt;I remember when I first started with Javascript, I was otherwise a bit familiar with HTML and CSS but coming to JS, I read a book of about 900 pages studying different concepts. In fact, I could tell you what I learnt if woken from a deep sleep but it came time to implement and I became blank. Why? Funny thing, I was scared of writing code just so I don't get an error but for goodness' sake, how do you get a result without putting input? I started playing with &lt;code&gt;console.log()&lt;/code&gt; then I was able to inject text with &lt;code&gt;innerHTML()&lt;/code&gt;. It worked like magic because gradually, I started working on different things including the almighty function and return statement.&lt;/p&gt;

&lt;p&gt;Before I continue, here is a schema, "for you to understand anything, you have to work everything you have learned to make it stick."&lt;/p&gt;

&lt;h2&gt;
  
  
  Another issue is  how to get money.
&lt;/h2&gt;

&lt;p&gt;First of all, I feel that before you transition a person into tech, direct such person on how to get passive source of income while learning in other to maintain body, spirit and soul. I got into tech after quitting my job calculating my risks with the hope that I could land a job within three months. Oops! I just fell into brokeland, and slowly, I blew out my savings on data subscriptions and other bills which just made me frustrated at this point. When you can no longer foot your bills, you get frustrated at this point because NOBODY will understand what you do except staring at a computer screen for hours on end wasting away time. Your family members start nagging and comparing you to friends working and how they are going to be able to purchase their first cars before you. You may act bold and all but don't lie, this gets to you and hurt you deeply. I have faced this a lot and remember how I sometimes cold email companies to grant job offers even without compensations as long as I can foot transportation bills and leave home everyday.&lt;/p&gt;

&lt;h2&gt;
  
  
  Market is hostile to newcomers
&lt;/h2&gt;

&lt;p&gt;I don't know if this is as a result of overcrowding but the barrier to entry is just ridiculous. I was first directed to take freelance gigs which I did but on signing up and setting my price, I put my price to $20 to at least get a first client, could have set it lower on upwork but I guess their terms were not allowing it at that point, bidded for entry level, intermediate and what not, but couldn't find anything. I guess people want to see testimonies first and I get it. No one wants to waste their money but even after posting projects, could not get anything. Then coming to the jobs, phew! you don't just get any and when you get, they require you to know things that even full stacks just learnt. I get it, you are looking for value but these things just take time to learn, I cannot create an algorithm that creates youtube websites on clicking a button that says 'create youtube template websites'. I need time and mentoring but it is what it is. As the saying goes, 'grow or die' so I keep growing till I can get that job and say 'I made it, time not wasted'. Till then, 'e go be'.&lt;/p&gt;

&lt;p&gt;I created this post for everyone out there especially the new developers to tell them that they are not alone'. Kindly subscribe to my blog, I will be posting new contents for learning and if possible, job opportunities to help people. Feel free to get across to me anytime. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Mydigicard: Personal project</title>
      <dc:creator>DAVID IKUKOYI</dc:creator>
      <pubDate>Fri, 01 Jul 2022 20:36:27 +0000</pubDate>
      <link>https://forem.com/davidblaqq/mydigicard-personal-project-3n2o</link>
      <guid>https://forem.com/davidblaqq/mydigicard-personal-project-3n2o</guid>
      <description>&lt;p&gt;It was a fine evening relaxing with friends chilling in the silhouette and making merry for Friday when a friend complained about a meeting he went for and on rounding up discussions he discovered that he forgot his business card at his office. There and then, I realized that things can be made simpler and easier. Why not just have your details on a QR that stores your information that can be easily scanned. I bet no one forgets their phone these days.&lt;br&gt;
Empowered by this thought, I got my hands dirty and started working on code and I developed this project called &lt;a href="https://mydigicard.netlify.app"&gt;mydigicard&lt;/a&gt; with ReactJS which features your basic card information.&lt;br&gt;
This idea can still be improved upon with other integrations like location API and other important day to day information.&lt;/p&gt;

&lt;p&gt;Kindly show off your works in the comment section too. This is a form of self appreciation.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>DATA TYPES</title>
      <dc:creator>DAVID IKUKOYI</dc:creator>
      <pubDate>Fri, 01 Jul 2022 20:01:05 +0000</pubDate>
      <link>https://forem.com/davidblaqq/data-types-eeg</link>
      <guid>https://forem.com/davidblaqq/data-types-eeg</guid>
      <description>&lt;p&gt;A major leap stone to understanding javascript and eventually other frameworks is by understanding the basics which is the data types. Data types in javascript are classifed into two groups which are&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;PRIMITIVE TYPES&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;REFERENCE TYPES&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Primitive types are data types that have no methods or properties. They are data types that cannot be changed. They are largely classified as immutable types which means they cannot be changed. Primitive types include &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Strings&lt;/li&gt;
&lt;li&gt;Numbers &lt;/li&gt;
&lt;li&gt;Null&lt;/li&gt;
&lt;li&gt;Undefined&lt;/li&gt;
&lt;li&gt;Boolean&lt;/li&gt;
&lt;li&gt;Symbols&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The symbol being the latest addition to the pack. The string can be dicey because we perform some manipulation on them like split method which converts it to an array for further manipulation but these methods are not actually performed on the string but the reference to the string. I will show you.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let a='mango';&lt;br&gt;
a.split().slice();&lt;br&gt;
//['m','a','n','g','o'] --expected output&lt;br&gt;
console.log(a)&lt;br&gt;
//'mango' --expected output&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Those methods were not actually performed on the string but a reference to the string. Strings are immutable properties. For you to change them, you have to reassign them. This feature makes them comparable which means string a is always equal to string a. All primitive types are comparable.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let foo=false;&lt;br&gt;
let boo=false;&lt;br&gt;
console.log(foo===boo) &lt;br&gt;
//true&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  REFERENCE TYPES
&lt;/h2&gt;

&lt;p&gt;These are data types that can be muted, operated upon, manipulated and they also serve as storage containers too.&lt;br&gt;
The three types are &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Object&lt;/li&gt;
&lt;li&gt;Arrays&lt;/li&gt;
&lt;li&gt;Functions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These types are defined as reference types and they are mutable properties which means that they can be operated upon. No two objects are the same  except if they are directly referenced to each other&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let c={name:'cat'}&lt;br&gt;
let d={name:'cat'}&lt;br&gt;
console.log(c===d) &lt;br&gt;
//false&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;However, if we reference an object to a variable, it equates to true&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let m=c&lt;br&gt;
console.log(m===c)&lt;br&gt;
//true&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Understanding these concepts are vital in understanding javascript and frameworks too especially react. For instance, react expects you to treat objects and arrays as immutable properties. I would be talking about  different types in subsequent posts.&lt;/p&gt;

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