<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Isaiah Temitope on Medium]]></title>
        <description><![CDATA[Stories by Isaiah Temitope on Medium]]></description>
        <link>https://medium.com/@isaiahtemitope4?source=rss-9093807a7b85------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*g_CFxdqbVeW89bZ-</url>
            <title>Stories by Isaiah Temitope on Medium</title>
            <link>https://medium.com/@isaiahtemitope4?source=rss-9093807a7b85------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 02:04:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@isaiahtemitope4/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Form Validation in React Js]]></title>
            <link>https://medium.com/@isaiahtemitope4/form-validation-in-react-js-c2a5f03f4150?source=rss-9093807a7b85------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2a5f03f4150</guid>
            <category><![CDATA[react-bootstrap]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[the-bulb-africa]]></category>
            <category><![CDATA[decagon]]></category>
            <category><![CDATA[react-hook]]></category>
            <dc:creator><![CDATA[Isaiah Temitope]]></dc:creator>
            <pubDate>Sat, 02 Apr 2022 17:19:39 GMT</pubDate>
            <atom:updated>2022-04-02T17:52:02.762Z</atom:updated>
            <content:encoded><![CDATA[<p>Validating a form is a pretty feature you should do on any app you are developing which requires collecting data through form. Come to think of it, if you find information without receiving an answer or you send it without getting to the destination, these two could occur due to the fact that there is no backend or a library taking care of the Form Submission.</p><p>In instances where we submitted a form in an app that has a backend or library handling the form submission, response could not reach us due to the fact that we provided a invalid contents when we wanted to submit the form.</p><p>Submitting a form with errors in it will notify us of where and what the error is. kindly see the picture below to know what happens when we have in valid inputs is a form that is validated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/212/1*J2YlQyCrR8XcwKTOFN6tdQ.png" /></figure><p>HOW TO VALIDATE A FORM IN REACT JS</p><p>For making things easier in creating a fast form, I advise you to install a package called “react-bootstrap”, we will be using react-bootstrap in creating a mobile responsive form, it does not mean react-bootstrap is only used in creating forms.</p><p>Now go into your working folder and run:</p><pre>npm install react-bootstrap </pre><p>on your terminal.</p><p>Upon successful installation of the package in your working folder, you are on a pretty road to creating your form validation. The procedure below will guide you step by step on what to do.</p><p>Step 1. Import react package into your working file.</p><pre><strong>import</strong> React, { useState } <strong>from</strong> “react”;</pre><p>Step 2. Import react-bootstrap into your working file.</p><pre><strong>import</strong> { Container, Row, Col, Form, Button } <strong>from</strong> “react-bootstrap”;</pre><p>Step 3. Create a functional component</p><pre>const contactForm = () =&gt; {</pre><pre>return (</pre><pre>);</pre><pre>};</pre><pre>export default contactForm;</pre><p>Step 4. Create your form inside the code in step 3.</p><pre>&lt;Container&gt;</pre><pre>&lt;Row&gt;</pre><pre>&lt;Col&gt;</pre><pre>&lt;div className=”col-sm-12&quot;&gt;</pre><pre>&lt;Form onSubmit={onSubmit}&gt;</pre><pre>&lt;Form.Group className=”w-50&quot;&gt;</pre><pre>&lt;Form.Label&gt;First Name&lt;/Form.Label&gt; &amp;nbsp;</pre><pre>&lt;Form.Control</pre><pre>className=”firstName w-100&quot;</pre><pre>autoFocus</pre><pre>name=”name”</pre><pre>placeholder=”Enter Firstname”</pre><pre>/&gt;</pre><pre>&lt;/Form.Group&gt;</pre><pre>&lt;Form.Group className=”w-50&quot;&gt;</pre><pre>&lt;Form.Label&gt;Last Name&lt;/Form.Label&gt;</pre><pre>&lt;Form.Control</pre><pre>className=”w-100&quot;</pre><pre>autoFocus</pre><pre>name=”name”</pre><pre>placeholder=”Enter Lastname” /&gt;</pre><pre>&lt;/Form.Group&gt;</pre><pre>&lt;Form.Group className=”w-50&quot;&gt;</pre><pre>&lt;Form.Label&gt;Email&lt;/Form.Label&gt;</pre><pre>&lt;Form.Control</pre><pre>className=”w-100&quot;</pre><pre>type=”email”</pre><pre>required=”true”</pre><pre>autoFocus /&gt;</pre><pre>&lt;/Form.Group&gt;</pre><pre>&lt;Form.Group className=”w-50&quot;&gt;</pre><pre>&lt;Form.Label</pre><pre>htmlFor=”defaultFormContactMessageEx”</pre><pre>className=”grey-text”</pre><pre>&gt;</pre><pre>Your message</pre><pre>&lt;/Form.Label&gt;</pre><pre>&lt;textarea</pre><pre>type=”text”</pre><pre>id=”defaultFormContactMessageEx”</pre><pre>className=”form-control w-100&quot;</pre><pre>required=”true”</pre><pre>/&gt;</pre><pre>&lt;/Form.Group&gt;</pre><pre>&lt;br /&gt;</pre><pre>&lt;Button type=”submit”&gt;Submit&lt;/Button&gt;</pre><pre>&lt;/Form&gt;</pre><pre>&lt;/div&gt;</pre><pre>&lt;/Col&gt;</pre><pre>&lt;/Row&gt;</pre><pre>&lt;/Container&gt;</pre><p>We add onSubmit and input value finally our step 4 should look like the code below.</p><pre>const contactForm = () =&gt; {</pre><pre>return (</pre><pre>&lt;Container&gt;</pre><pre>&lt;Row&gt;</pre><pre>&lt;Col&gt;</pre><pre>&lt;div className=”col-sm-12&quot;&gt;</pre><pre>&lt;Form onSubmit={onSubmit}&gt;</pre><pre>&lt;Form.Group className=&quot;w-50&quot;&gt;</pre><pre>&lt;Form.Label&gt;First Name&lt;/Form.Label&gt; &amp;nbsp;</pre><pre>&lt;Form.Control</pre><pre>className=&quot;firstName w-100&quot;</pre><pre>autoFocus</pre><pre>name=&quot;name&quot;</pre><pre>placeholder=&quot;Enter Firstname&quot;</pre><pre>value={firstName}</pre><pre>/&gt;</pre><pre>&lt;/Form.Group&gt;</pre><pre>&lt;Form.Group className=&quot;w-50&quot;&gt;</pre><pre>&lt;Form.Label&gt;Last Name&lt;/Form.Label&gt;</pre><pre>&lt;Form.Control</pre><pre>className=&quot;w-100&quot;</pre><pre>autoFocus</pre><pre>name=&quot;name&quot;</pre><pre>placeholder=&quot;Enter Lastname&quot;</pre><pre>value={lastName}</pre><pre>/&gt;</pre><pre>&lt;/Form.Group&gt;</pre><pre>&lt;Form.Group className=&quot;w-50&quot;&gt;</pre><pre>&lt;Form.Label&gt;Email&lt;/Form.Label&gt;</pre><pre>&lt;Form.Control</pre><pre>className=&quot;w-100&quot;</pre><pre>type=&quot;email&quot;</pre><pre>required=&quot;true&quot;</pre><pre>autoFocus</pre><pre>value = {email}</pre><pre>placeholder=&quot;Enter email&quot;</pre><pre>/&gt;</pre><pre>&lt;/Form.Group&gt;</pre><pre>&lt;Form.Group className=&quot;w-50&quot;&gt;</pre><pre>&lt;Form.Label</pre><pre>htmlFor=&quot;defaultFormContactMessageEx&quot;</pre><pre>className=&quot;grey-text&quot;</pre><pre>&gt;</pre><pre>Your message</pre><pre>&lt;/Form.Label&gt;</pre><pre>&lt;textarea</pre><pre>type=&quot;text&quot;</pre><pre>id=&quot;defaultFormContactMessageEx&quot;</pre><pre>className=&quot;form-control w-100&quot;</pre><pre>required=&quot;true&quot;</pre><pre>value={message}</pre><pre>rows=&quot;3&quot;</pre><pre>/&gt;</pre><pre>&lt;/Form.Group&gt;</pre><pre>&lt;br /&gt;</pre><pre>&lt;Button type=&quot;submit&quot;&gt;Submit&lt;/Button&gt;</pre><pre>&lt;/Form&gt;</pre><pre>&lt;/div&gt;</pre><pre>&lt;/Col&gt;</pre><pre>&lt;/Row&gt;</pre><pre>&lt;/Container&gt;</pre><pre>);</pre><pre>};</pre><pre>export default contactForm;</pre><p>Step 5. We create our state variables with the help of useState</p><pre>// useState in setting values to inputs</pre><pre>const [firstName, setFirstName] = useState(“”);</pre><pre>const [lastName, setLastName] = useState(“”);</pre><pre>const [message, setMessage] = useState(“”);</pre><pre>// useState in setting errors</pre><pre>const [firstNameErr, setFirstNameErr] = useState({});</pre><pre>const [lastNameErr, setLastNameErr] = useState({});</pre><pre>const [emailError, setEmailError] = useState(“”);</pre><pre>const [messageErr, setMessageErr] = useState({});</pre><p>Step 6. Create validation for all inputs.</p><pre>// on submit actions</pre><pre>const onSubmit = (e) =&gt; {</pre><pre>e.preventDefault();</pre><pre>const isValid = formValidation();</pre><pre>if (isValid) {</pre><pre>// send this data to your backend or some external API</pre><pre>setFirstName(“”);</pre><pre>setLastName(“”);</pre><pre>setMessage(“”);</pre><pre>setEmail(“”);</pre><pre>}</pre><pre>// call the server</pre><pre>console.log(“Submitted”);</pre><pre>};</pre><pre>const formValidation = () =&gt; {</pre><pre>const firstNameErr = {};</pre><pre>const lastNameErr = {};</pre><pre>const messageErr = {};</pre><pre>let isValid = true;</pre><pre>if (firstName.length === 0) {</pre><pre>firstNameErr.firstNameShort = “First name is required”;</pre><pre>isValid = false;</pre><pre>}</pre><pre>if (firstName.trim().length &gt; 10) {</pre><pre>firstNameErr.firstNameLong = “First name is too long”;</pre><pre>isValid = false;</pre><pre>}</pre><pre>if (lastName.length === 0) {</pre><pre>lastNameErr.lastNameShort = “Last name is required”;</pre><pre>isValid = false;</pre><pre>}</pre><pre>if (lastName.trim().length &gt; 10) {</pre><pre>lastNameErr.lastNameLong = “Last name is too long”;</pre><pre>isValid = false;</pre><pre>}</pre><pre>if (message.length === 0) {</pre><pre>messageErr.messageShort = “Please type your message”;</pre><pre>isValid = false;</pre><pre>}</pre><pre>setFirstNameErr(firstNameErr);</pre><pre>setLastNameErr(lastNameErr);</pre><pre>setMessageErr(messageErr);</pre><pre>return isValid;</pre><pre>};</pre><pre>// email validation</pre><pre>const [email, setEmail] = useState(“”);</pre><pre>// const [valid, setValid] = useState(“”);</pre><pre>const validateEmail = (e) =&gt; {</pre><pre>setEmail(e.target.value)</pre><pre>var validateMail = validateEmails(email);</pre><pre>if (validateMail) {</pre><pre>setEmailError(“”);</pre><pre>} else {</pre><pre>setEmailError(</pre><pre>&lt;h6</pre><pre>style={{</pre><pre>fontWeight: “bold”,</pre><pre>color: “red”,</pre><pre>}}</pre><pre>&gt;</pre><pre>Enter a valid email</pre><pre>&lt;/h6&gt;</pre><pre>);</pre><pre>}</pre><pre>};</pre><pre>function validateEmails(email) {</pre><pre>const re =</pre><pre>/^(([^&lt;&gt;()\[\]\\.,;:\s@”]+(\.[^&lt;&gt;()\[\]\\.,;:\s@”]+)*)|(“.+”))@((\[[0–9]{1,3}\.[0–9]{1,3}\.[0–9]{1,3}\.[0–9]{1,3}\])|(([a-zA-Z\-0–9]+\.)+[a-zA-Z]{2,}))$/;</pre><pre>return re.test(String(email).toLowerCase());</pre><pre>}</pre><p>Step 7. Set error message for each input to check for validation. And this should be at the end of each input field in the form. Our code should look exactly like this.</p><pre>&lt;Container&gt;</pre><pre>&lt;Row&gt;</pre><pre>&lt;Col&gt;</pre><pre>&lt;div className=”col-sm-12&quot;&gt;</pre><pre>&lt;Form onSubmit={onSubmit}&gt;</pre><pre>&lt;Form.Group className=”w-50&quot;&gt;</pre><pre>&lt;Form.Label&gt;First Name&lt;/Form.Label&gt; &amp;nbsp;</pre><pre>&lt;Form.Control</pre><pre>className=”firstName w-100&quot;</pre><pre>autoFocus</pre><pre>name=”name”</pre><pre>placeholder=”Enter Firstname”</pre><pre>value={firstName}</pre><pre>onChange={(e) =&gt; {</pre><pre>setFirstName(e.target.value);</pre><pre>}}</pre><pre>/&gt;</pre><pre>&lt;/Form.Group&gt;</pre><pre>{Object.keys(firstNameErr).map((key) =&gt; {</pre><pre>return &lt;div style={{ color: “red” }}&gt;{firstNameErr[key]}&lt;/div&gt;;</pre><pre>})}</pre><pre>&lt;Form.Group className=”w-50&quot;&gt;</pre><pre>&lt;Form.Label&gt;Last Name&lt;/Form.Label&gt;</pre><pre>&lt;Form.Control</pre><pre>className=”w-100&quot;</pre><pre>autoFocus</pre><pre>name=”name”</pre><pre>placeholder=”Enter Lastname”</pre><pre>value={lastName}</pre><pre>onChange={(e) =&gt; {</pre><pre>setLastName(e.target.value);</pre><pre>}}</pre><pre>/&gt;</pre><pre>&lt;/Form.Group&gt;</pre><pre>{Object.keys(lastNameErr).map((key) =&gt; {</pre><pre>return &lt;div style={{ color: “red” }}&gt;{lastNameErr[key]}&lt;/div&gt;;</pre><pre>})}</pre><pre>&lt;Form.Group className=”w-50&quot;&gt;</pre><pre>&lt;Form.Label&gt;Email&lt;/Form.Label&gt;</pre><pre>&lt;Form.Control</pre><pre>className=”w-100&quot;</pre><pre>type=”email”</pre><pre>required=”true”</pre><pre>autoFocus</pre><pre>value = {email}</pre><pre>placeholder=”Enter email”</pre><pre>onChange={(e) =&gt; validateEmail(e)}</pre><pre>/&gt;</pre><pre>&lt;/Form.Group&gt;</pre><pre>&lt;&gt;{emailError}&lt;/&gt;</pre><pre>&lt;Form.Group className=”w-50&quot;&gt;</pre><pre>&lt;Form.Label</pre><pre>htmlFor=”defaultFormContactMessageEx”</pre><pre>className=”grey-text”</pre><pre>&gt;</pre><pre>Your message</pre><pre>&lt;/Form.Label&gt;</pre><pre>&lt;textarea</pre><pre>type=”text”</pre><pre>id=”defaultFormContactMessageEx”</pre><pre>className=”form-control w-100&quot;</pre><pre>required=”true”</pre><pre>value={message}</pre><pre>rows=”3&quot;</pre><pre>onChange={(e) =&gt; {</pre><pre>setMessage(e.target.value);</pre><pre>}}</pre><pre>/&gt;</pre><pre>&lt;/Form.Group&gt;</pre><pre>{Object.keys(messageErr).map((key) =&gt; {</pre><pre>return &lt;div style={{ color: “red” }}&gt;{messageErr[key]}&lt;/div&gt;;</pre><pre>})}</pre><pre>&lt;br /&gt;</pre><pre>&lt;Button type=”submit”&gt;Submit&lt;/Button&gt;</pre><pre>&lt;/Form&gt;</pre><pre>&lt;/div&gt;</pre><pre>&lt;/Col&gt;</pre><pre>&lt;/Row&gt;</pre><pre>&lt;/Container&gt;</pre><p>And finally, our code should look like this</p><pre>import React, { useState } from “react”;</pre><pre>import { Container, Row, Col, Form, Button } from “react-bootstrap”;</pre><pre>const contactForm = () =&gt; {</pre><pre>// Name, message validation</pre><pre>const [firstName, setFirstName] = useState(“”);</pre><pre>const [lastName, setLastName] = useState(“”);</pre><pre>const [message, setMessage] = useState(“”);</pre><pre>const [firstNameErr, setFirstNameErr] = useState({});</pre><pre>const [lastNameErr, setLastNameErr] = useState({});</pre><pre>const [emailError, setEmailError] = useState(“”);</pre><pre>const [messageErr, setMessageErr] = useState({});</pre><pre>// on submit actions</pre><pre>const onSubmit = (e) =&gt; {</pre><pre>e.preventDefault();</pre><pre>const isValid = formValidation();</pre><pre>if (isValid) {</pre><pre>// send this data to your backend or some external API</pre><pre>setFirstName(“”);</pre><pre>setLastName(“”);</pre><pre>setMessage(“”);</pre><pre>setEmail(“”);</pre><pre>}</pre><pre>// call the server</pre><pre>console.log(“Submitted”);</pre><pre>};</pre><pre>const formValidation = () =&gt; {</pre><pre>const firstNameErr = {};</pre><pre>const lastNameErr = {};</pre><pre>const messageErr = {};</pre><pre>let isValid = true;</pre><pre>if (firstName.length === 0) {</pre><pre>firstNameErr.firstNameShort = “First name is required”;</pre><pre>isValid = false;</pre><pre>}</pre><pre>if (firstName.trim().length &gt; 10) {</pre><pre>firstNameErr.firstNameLong = “First name is too long”;</pre><pre>isValid = false;</pre><pre>}</pre><pre>if (lastName.length === 0) {</pre><pre>lastNameErr.lastNameShort = “Last name is required”;</pre><pre>isValid = false;</pre><pre>}</pre><pre>if (lastName.trim().length &gt; 10) {</pre><pre>lastNameErr.lastNameLong = “Last name is too long”;</pre><pre>isValid = false;</pre><pre>}</pre><pre>if (message.length === 0) {</pre><pre>messageErr.messageShort = “Please type your message”;</pre><pre>isValid = false;</pre><pre>}</pre><pre>setFirstNameErr(firstNameErr);</pre><pre>setLastNameErr(lastNameErr);</pre><pre>setMessageErr(messageErr);</pre><pre>return isValid;</pre><pre>};</pre><pre>// email validation</pre><pre>const [email, setEmail] = useState(“”);</pre><pre>const validateEmail = (e) =&gt; {</pre><pre>setEmail(e.target.value)</pre><pre>var validateMail = validateEmails(email);</pre><pre>if (validateMail) {</pre><pre>setEmailError(“”);</pre><pre>} else {</pre><pre>setEmailError(</pre><pre>&lt;h6</pre><pre>style={{</pre><pre>fontWeight: “bold”,</pre><pre>color: “red”,</pre><pre>}}</pre><pre>&gt;</pre><pre>Enter a valid email</pre><pre>&lt;/h6&gt;</pre><pre>);</pre><pre>}</pre><pre>};</pre><pre>function validateEmails(email) {</pre><pre>const re =</pre><pre>/^(([^&lt;&gt;()\[\]\\.,;:\s@”]+(\.[^&lt;&gt;()\[\]\\.,;:\s@”]+)*)|(“.+”))@((\[[0–9]{1,3}\.[0–9]{1,3}\.[0–9]{1,3}\.[0–9]{1,3}\])|(([a-zA-Z\-0–9]+\.)+[a-zA-Z]{2,}))$/;</pre><pre>return re.test(String(email).toLowerCase());</pre><pre>}</pre><pre>return (</pre><pre>&lt;Container&gt;</pre><pre>&lt;Row&gt;</pre><pre>&lt;Col&gt;</pre><pre>&lt;div className=”col-sm-12&quot;&gt;</pre><pre>&lt;Form onSubmit={onSubmit}&gt;</pre><pre>&lt;Form.Group className=”w-50&quot;&gt;</pre><pre>&lt;Form.Label&gt;First Name&lt;/Form.Label&gt; &amp;nbsp;</pre><pre>&lt;Form.Control</pre><pre>className=”firstName w-100&quot;</pre><pre>autoFocus</pre><pre>name=”name”</pre><pre>placeholder=”Enter Firstname”</pre><pre>value={firstName}</pre><pre>onChange={(e) =&gt; {</pre><pre>setFirstName(e.target.value);</pre><pre>}}</pre><pre>/&gt;</pre><pre>&lt;/Form.Group&gt;</pre><pre>{Object.keys(firstNameErr).map((key) =&gt; {</pre><pre>return &lt;div style={{ color: “red” }}&gt;{firstNameErr[key]}&lt;/div&gt;;</pre><pre>})}</pre><pre>&lt;Form.Group className=”w-50&quot;&gt;</pre><pre>&lt;Form.Label&gt;Last Name&lt;/Form.Label&gt;</pre><pre>&lt;Form.Control</pre><pre>className=”w-100&quot;</pre><pre>autoFocus</pre><pre>name=”name”</pre><pre>placeholder=”Enter Lastname”</pre><pre>value={lastName}</pre><pre>onChange={(e) =&gt; {</pre><pre>setLastName(e.target.value);</pre><pre>}}</pre><pre>/&gt;</pre><pre>&lt;/Form.Group&gt;</pre><pre>{Object.keys(lastNameErr).map((key) =&gt; {</pre><pre>return &lt;div style={{ color: “red” }}&gt;{lastNameErr[key]}&lt;/div&gt;;</pre><pre>})}</pre><pre>&lt;Form.Group className=”w-50&quot;&gt;</pre><pre>&lt;Form.Label&gt;Email&lt;/Form.Label&gt;</pre><pre>&lt;Form.Control</pre><pre>className=”w-100&quot;</pre><pre>type=”email”</pre><pre>required=”true”</pre><pre>autoFocus</pre><pre>value = {email}</pre><pre>placeholder=”Enter email”</pre><pre>onChange={(e) =&gt; validateEmail(e)}</pre><pre>/&gt;</pre><pre>&lt;/Form.Group&gt;</pre><pre>&lt;&gt;{emailError}&lt;/&gt;</pre><pre>&lt;Form.Group className=”w-50&quot;&gt;</pre><pre>&lt;Form.Label</pre><pre>htmlFor=”defaultFormContactMessageEx”</pre><pre>className=”grey-text”</pre><pre>&gt;</pre><pre>Your message</pre><pre>&lt;/Form.Label&gt;</pre><pre>&lt;textarea</pre><pre>type=”text”</pre><pre>id=”defaultFormContactMessageEx”</pre><pre>className=”form-control w-100&quot;</pre><pre>required=”true”</pre><pre>value={message}</pre><pre>rows=”3&quot;</pre><pre>onChange={(e) =&gt; {</pre><pre>setMessage(e.target.value);</pre><pre>}}</pre><pre>/&gt;</pre><pre>&lt;/Form.Group&gt;</pre><pre>{Object.keys(messageErr).map((key) =&gt; {</pre><pre>return &lt;div style={{ color: “red” }}&gt;{messageErr[key]}&lt;/div&gt;;</pre><pre>})}</pre><pre>&lt;br /&gt;</pre><pre>&lt;Button type=”submit”&gt;Submit&lt;/Button&gt;</pre><pre>&lt;/Form&gt;</pre><pre>&lt;/div&gt;</pre><pre>&lt;/Col&gt;</pre><pre>&lt;/Row&gt;</pre><pre>&lt;/Container&gt;</pre><pre>);</pre><pre>};</pre><pre>export default contactForm;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2a5f03f4150" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Weather Observation Station 17]]></title>
            <link>https://medium.com/@isaiahtemitope4/weather-observation-station-17-b582db4b1af?source=rss-9093807a7b85------2</link>
            <guid isPermaLink="false">https://medium.com/p/b582db4b1af</guid>
            <dc:creator><![CDATA[Isaiah Temitope]]></dc:creator>
            <pubDate>Wed, 23 Mar 2022 16:47:17 GMT</pubDate>
            <atom:updated>2022-03-23T16:47:17.423Z</atom:updated>
            <content:encoded><![CDATA[<p>Query the Western Longitude (LONG_W)where the smallest Northern Latitude (LAT_N) in <strong>STATION</strong> is greater than <strong>38.7780</strong> . Round your answer to <strong>4</strong> decimal places.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*uTD8PHLxW4fYYk0zmZL2zQ.png" /></figure><h3>SOLUTION :</h3><p><em>SELECT ROUND(LONG_W,4) FROM STATION <br>WHERE LAT_N=(SELECT MIN(LAT_N) FROM STATION WHERE LAT_N &gt; 38.7780);</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b582db4b1af" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My experience contributing to Nigerianlogos by paystack.]]></title>
            <link>https://medium.com/@isaiahtemitope4/my-first-open-source-contribution-be8dcc2d8da7?source=rss-9093807a7b85------2</link>
            <guid isPermaLink="false">https://medium.com/p/be8dcc2d8da7</guid>
            <category><![CDATA[gitfork]]></category>
            <category><![CDATA[pull-request]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Isaiah Temitope]]></dc:creator>
            <pubDate>Thu, 17 Mar 2022 16:30:52 GMT</pubDate>
            <atom:updated>2022-03-18T12:45:34.405Z</atom:updated>
            <content:encoded><![CDATA[<h3>My First Open-source contribution</h3><p>During interviews, I have been asked if I have ever worked on an open-source project before? Deep within me, I consider this as something difficult. As a matter of fact, it was as easy as learning ABC as an adult.</p><h3><strong>What is open-source?</strong></h3><p>Open-source in software engineering is a type of software that is made open and available for everyone to add or remove some parts from the code.</p><p>Every beginner in software engineering can add or remove from an open source, as far as you can understand the way the code is being written, and also following the steps provided by the person who created the project.</p><h3><strong>How to contribute to Open-source project</strong></h3><p>I was able to make my first open-source contribution to NigeriaLogos by paystack, i added ku fm logo as my contribution to the open source not because I am a very good programmer. As a matter of fact, I find it difficult to read other people’s codes. Adding my code to the open-source project was made easy because I read the instructions provided on how to add my own code. So I advise you all to learn to read instructions whenever you want to add to an open-source so that you will have an understanding of what is needed in the project.</p><p>After knowing the above, I forked the project, cloned it to my own system. Do not get worried on how to fork and clone a project, just visit: <a href="https://docs.github.com/en/get-started/quickstart/fork-a-repo">Fork and clone on git hub</a> to know how to go about it. After doing all this, create a new branch, click <a href="https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-a-branch-for-an-issue">creating branch</a> to learn how to.</p><p>After creating the new branch, add your contribution to the code, do the following.</p><ol><li>Git Add</li><li>Commit all changes</li><li>Push</li></ol><p>The above can be done through a guide from the link <a href="https://panjeh.medium.com/makefile-git-add-commit-push-github-all-in-one-command-9dcf76220f48">Add, commit and push</a>.</p><ol><li>Create a pull request from git. Check on how to do this in the link provided: <a href="https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request">Pull request</a>.</li></ol><p>And finally, you can beat your chest to say you have contributed to an open-source.</p><p>Thanks…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be8dcc2d8da7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[THINK LIKE A PROGRAMMER]]></title>
            <link>https://medium.com/@isaiahtemitope4/think-like-a-programmer-c8740b347fc2?source=rss-9093807a7b85------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8740b347fc2</guid>
            <category><![CDATA[think-like-a-programmer]]></category>
            <dc:creator><![CDATA[Isaiah Temitope]]></dc:creator>
            <pubDate>Tue, 08 Mar 2022 17:02:46 GMT</pubDate>
            <atom:updated>2022-03-08T17:02:46.257Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>HOW TO THINK LIKE A PROGRAMMER</strong></p><p>Every developer or aspiring developer faces the most common problem which is the technical knowledge in digesting algorithms and expressions into executable codes. The absence of technical understanding as a developer is a problem, this will lead us to discuss problem-solving techniques.</p><p><strong>PROBLEM-SOLVING STRATEGIES</strong></p><p>In solving problems, it is required to go through a diverse application method in ensuring there is a specific solution to a given problem. Problem-solving strategies involve the following methods:</p><ul><li><strong>CREATE A PLAN: </strong>In solving a problem, it is required that one can digest what the problem is to know the appropriate approach that can be used in solving a problem. The absence of planning will create extended problem-solving solutions that might end up unsuccessful or successful due to guesswork which later might not be applicable to solve further problems thus creating more complexity.</li><li><strong>RENDER THE PROBLEM: </strong>This process involves putting the problem into consideration from different angles. Shuffling and restructuring the problem will give a better view of understanding the problem and seeing possible obstacles in solving the problem.</li><li><strong>BREAK THE PROBLEM:</strong> Just like climbing a mountain step by step, breaking a problem into units and providing solutions for each unit will help create a plan in rendering the problem as a whole. Complex algorithms can be best solved through coding the algorithms into parts and merging the code as a whole to provide a solution to the algorithm as a whole.</li><li><strong>START WITH WHAT YOU KNOW: </strong>After breaking problems into parts, it is best advised that you bring into implementation a known approach for solving each part as this might spring up solutions to other parts of the problem. Upon starting with what you know, consultations and research will help bring more ideas on how to solve the problem as a whole.</li><li><strong>REDUCING A PROBLEM: </strong>When complex situations in solving a problem arise, reduce the problem as it will tear apart the complexity of the problem. As a programmer, reducing a problem and writing codes for reduced problems will help to create a partially solved problem and upon research and consultation, more insight about the problem will be attained.</li><li><strong>LOOK FOR ANALOGIES: </strong>Analogy entails looking for a solved problem and relating it to the current problem. An analogy might give you a hint on how to put up code to solve part of the problem, you are yet to understand the problem if you can’t provide a working code of yourself after comparison.</li><li><strong>EXPERIMENT: </strong>Writing codes and trying new things spring up new ideas of doing something new, not in the act of guessing but in the act of trying to attain certainty about doubt. If a particular approach is new to you in solving an algorithm, kindly create a new working environment, copy and execute the code in the new environment to understand its functionality.</li><li><strong>DON’T GET FRUSTRATED: </strong>Frustration as a developer is tantamount to distraction as it will deprive you of thinking smart thus causing a longer time in writing meaningful codes to solve problems. It is advisable to stay calm and stay away from issues that will create frustration within you.</li></ul><p>Thanks</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8740b347fc2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HOW WEB EVENTS BEHAVE IN JAVASCRIPT]]></title>
            <link>https://medium.com/@isaiahtemitope4/how-web-events-behave-in-javascript-c0c019f636bc?source=rss-9093807a7b85------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0c019f636bc</guid>
            <dc:creator><![CDATA[Isaiah Temitope]]></dc:creator>
            <pubDate>Fri, 04 Mar 2022 21:36:38 GMT</pubDate>
            <atom:updated>2022-03-04T21:44:55.543Z</atom:updated>
            <content:encoded><![CDATA[<p>Event is a sign that something has happened, or is happening, and can be started by user interaction or browser-wikipedia.</p><p>Events are events in the system where coding, transmitting information or performing a specific task. In the case of the Web, events are dragged out of the browser window, and pasted into something connected to it. This could be a single object, a set of objects, an HTML document uploaded to the current tab, or an entire browser window. An event is a warning in a code or line of code to perform a specific task when encountered.</p><p>Below are a few examples of common occurrences on the website:</p><ol><li>The page just finished loading</li><li>User clicks a button</li><li>User moves over the drop</li><li>User submits form</li><li>The user presses a key on his keyboard</li></ol><p>By coding JavaScript responses that apply to an event, developers can display messages to users, authenticate data, respond with a click of a button, and many other actions.</p><p>In this article, we will pass on event managers, event listeners, and event items. We will also go through three different ways to write event management code, as well as a few common events. By learning about events, you will be able to create a more interactive web experience for end users.</p><h3>Event Handlers and Event Listeners</h3><p>When a user presses a button or presses a key, the event is dismissed. This is called a click-through event or a key press event, respectively.</p><p>Event Handler is a JavaScript function that initiates an event.</p><p>The event listener attaches a responsive visual interface to the object, allowing the object to wait and “listen” to execute the command.</p><p>There are three ways to assign events to elements:</p><ol><li>Inline Event Handler Attributes</li><li>Event Handler Properties</li><li>Event listeners</li></ol><h3><strong>Inline Event Handler Attributes</strong></h3><p>Inline events are tied to an object with its attribute name, which begins with the beginning “on”. This works like our inline css. Not all types of event can be tied to all aspects. For example, changes are often associated with text input fields. Here is a list of common HTML events:</p><ul><li>onchange: An HTML element has been changed</li><li>onclick: The user clicks an HTML element</li><li>onmouseover: The user hovers the mouse over an HTML element</li><li>onmouseout: The user moves the mouse away from an HTML element</li><li>onkeydown: The user pushes a keyboard key down</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/0*64MVD83gFNU8cOqz" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/0*CISywIMuIgfsyzo1" /></figure><h3><strong>Event Handler Properties</strong></h3><p>Event Management Properties work very similar to in-line controls, except that we set the feature feature in JavaScript, instead of the attribute in our HTML. this works like our internal css. It picks something up on the page, and uses the action / event to do it.</p><p>Our HTML is the same, except that we now do not include the onclick = “changeText ()” we used earlier:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/0*viAw1aF6YMxshO9n" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/0*WmGRZZpLexcZNJSd" /></figure><h3><strong>Event listeners</strong></h3><p>Event listeners are watching the event with something, instead of providing the event directly to the site, we will use the addEventListener () method to listen to the event. This works like our external css. Not mentioned on the page directly, it selects the attribute on the page and performs a specific function on the page.</p><p>addEventListener () captures two mandatory parameters — the event to listen to and the repetition function for the listener.</p><p>The HTML of our event listener will always be the same as in the previous example. And we will still use the same changeText () function as before.</p><p>However, we will now paste the addEventListener () button to the button, as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/0*cWLBKPxN6WX3G3Sp" /></figure><p>Basically, it is not advised to use inline Event Handler just in order to practice neat coding.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0c019f636bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>