<?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: Adegboyega Adedamola Wilson</title>
    <description>The latest articles on DEV Community by Adegboyega Adedamola Wilson (@wilsonadedamola).</description>
    <link>https://dev.to/wilsonadedamola</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%2F1131062%2F4ab7e9c7-9f1a-40fe-b86b-ca976a22f9f7.jpeg</url>
      <title>DEV Community: Adegboyega Adedamola Wilson</title>
      <link>https://dev.to/wilsonadedamola</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wilsonadedamola"/>
    <language>en</language>
    <item>
      <title>The Basics of Web Development: A Comprehensive Guide for Beginners</title>
      <dc:creator>Adegboyega Adedamola Wilson</dc:creator>
      <pubDate>Fri, 18 Aug 2023 11:44:40 +0000</pubDate>
      <link>https://dev.to/wilsonadedamola/the-basics-of-web-development-a-comprehensive-guide-for-beginners-45of</link>
      <guid>https://dev.to/wilsonadedamola/the-basics-of-web-development-a-comprehensive-guide-for-beginners-45of</guid>
      <description>&lt;p&gt;A beginner guide to the basics of web development&lt;/p&gt;

&lt;h4&gt;
  
  
  Table of Content:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Introduction to Web Development&lt;/li&gt;
&lt;li&gt;Frontend Development

&lt;ul&gt;
&lt;li&gt;HTML&lt;/li&gt;
&lt;li&gt;CSS&lt;/li&gt;
&lt;li&gt;JavaScript&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Backend Development

&lt;ul&gt;
&lt;li&gt;Server-side languages&lt;/li&gt;
&lt;li&gt;Databases&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Frameworks

&lt;ul&gt;
&lt;li&gt;Frontend frameworks&lt;/li&gt;
&lt;li&gt;Backend frameworks&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Version Control&lt;/li&gt;
&lt;li&gt;Responsive Design&lt;/li&gt;
&lt;li&gt;Web Hosting and Deployment&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Introduction to Web Development
&lt;/h4&gt;

&lt;p&gt;Web Development involves building or creating websites that are accessible over the internet. The websites are developed using different programming languages, tools, and frameworks.&lt;br&gt;
The person who develops a website is called a web developer. Web developers ensure that the websites created are accessible over the internet.&lt;/p&gt;

&lt;h4&gt;
  
  
  Frontend Development
&lt;/h4&gt;

&lt;p&gt;Frontend Development involves developing the visual part of the website that users interact directly with. Below are the technologies that web developers use to build the frontend interface:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;HTML: HTML(Hypertext Markup Language) is not a programming language but a markup language used to create and structure the content of a page. &lt;br&gt;
Some people call HTML the skeleton of a webpage simply because it's the backbone of all web pages. Using ‘elements’ and ‘tags’ to structure how different parts of a webpage should appear.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CSS: CSS(Cascading Style Sheets) is used to style HTML elements. Elements like texts, headings, and images. It works with HTML to apply appropriate designs and styles like colors, spacing, and font size of the webpage content, ensuring it is beautifully structured and appealing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JavaScript: JavaScript is a programming language that adds functionality and interaction to a website. It is used to create dynamic web pages that respond to different actions from the user—for example, clicking a button, submitting a form, manipulating data, and updating page content without reloading the page.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Backend Development
&lt;/h4&gt;

&lt;p&gt;Backend development involves developing the server side of a website or web application. It involves dealing with databases, server logic, and APIs, in short, the behind-the-scene activities of a website. Developers use backend languages and their frameworks to build server-side functions.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Server-side languages: These are languages that are used to build the logic and functionality on the server side of a website. Examples of these languages are PHP, Python, Ruby, Java, Node.js, and others.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Databases: Databases are used to store, retrieve and manage data used by the application. Examples of databases are MySQL, MongoDB, SQLite, PostgreSQL, and others.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Frameworks
&lt;/h4&gt;

&lt;p&gt;Frameworks are a set of pre-built tools, functions, and collection of libraries that assists developers to create websites or web applications faster and easier. Frameworks are structured, reusable, and usually built on a programming language.&lt;/p&gt;

&lt;p&gt;For Web development, we have a Frontend framework and a Backend framework.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Frontend Frameworks: These are a pre-built set of tools and codes that accelerates the building of user interfaces - the visual parts of a website or web app that the user interacts with. They provide developers with pre-built solutions that facilitate the development process and allow them to start building without starting from scratch.
Below are some examples of frontend frameworks and their programming languages(in brackets):&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;React(Javascript)&lt;/li&gt;
&lt;li&gt;Angular(Javascript)&lt;/li&gt;
&lt;li&gt;Vue(Javascript)&lt;/li&gt;
&lt;li&gt;TailwindCSS(CSS)&lt;/li&gt;
&lt;li&gt;Bootstrap(CSS)&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Backend Frameworks: These are a pre-built set of functions that makes it easier for developers to build the server side for a website or web application. Backend frameworks simplify complicated processes, allowing the developer to focus on improving the website's or web application's efficiency and functionality. Below are some examples of backend frameworks and their programming languages(in brackets):&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Laravel(PHP)&lt;/li&gt;
&lt;li&gt;Django(Python)&lt;/li&gt;
&lt;li&gt;Express.js(Node.js)&lt;/li&gt;
&lt;li&gt;Ruby on Rails(Ruby)&lt;/li&gt;
&lt;li&gt;Flask(Python)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Frameworks accelerate building by providing a pre-built set of tools and codes, this simplifies website creation and allows developers to build more efficient websites and web applications with less effort.&lt;/p&gt;

&lt;h4&gt;
  
  
  Version Control
&lt;/h4&gt;

&lt;p&gt;Version controls are systems and tools that enable developers to track and maintain their codebase. They also allow collaboration between multiple developers. Version control enables developers to return to their code's previous version.&lt;br&gt;
For example, if you write a program and save it as ‘first program’, then you update or make changes to it and save it as ‘first program update’, later you decide that you want to go back to the first version of the program, version control enables you to revert to the first version(saved as first program) of the program.&lt;br&gt;
A famous example of version control is Git/Github.&lt;/p&gt;

&lt;h4&gt;
  
  
  Responsive Design
&lt;/h4&gt;

&lt;p&gt;Responsive design also known as responsive web design involves creating websites or web applications that automatically adapt and adjust their layout irrespective of the screen size or device on which the website is being accessed.&lt;br&gt;
To learn more about responsive design &lt;a href="https://dev.to/wilsonadedamola/a-step-by-step-guide-to-building-a-responsive-and-mobile-friendly-website-from-scratch-h51"&gt;here&lt;/a&gt; is a &lt;a href="https://dev.to/wilsonadedamola/a-step-by-step-guide-to-building-a-responsive-and-mobile-friendly-website-from-scratch-h51"&gt;link&lt;/a&gt;to an article that discusses extensively on responsiveness.&lt;/p&gt;

&lt;h4&gt;
  
  
  Web Hosting and Deployment
&lt;/h4&gt;

&lt;p&gt;Web hosting and deployment involve making your website available to the public by hosting it on a server. When you are done creating and testing the functionality of your website, you need to make it available to the public, this is where deployment comes in, with the necessary resources you deploy your website (the files of your website such as HTML, CSS, JavaScript, and other files it comprises of) to a web hosting server, this enables people to access the website.&lt;br&gt;
To host your website you’ll need a domain name and a server:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Domain name: A domain name is a unique name your website is associated with. For example, ‘www.google.com’, your unique domain name is what users will enter into the browser to access your website.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Web Hosting Server: A web hosting server is a provider that allows you to store your website’s files on its server space. Examples of web hosting server providers are Amazon Web Services, Microsoft Azure, Heroku, Netlify, Vercel, Github pages, and others.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In summary, web hosting and deployment is an important process that allows people to access your website. By getting a domain name and deploying the website to a server space users will be able to access it.&lt;/p&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;As a beginner, there are many opportunities in web development, but to find these opportunities, you need to start with web development basics which are HTML, CSS, and JavaScript. After the basics, progress to backend languages, then frameworks. While learning don't forget to put what you learned into practice. Continue learning and improving your skill because web development keeps evolving, then you will discover rewarding opportunities in web development.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>html</category>
      <category>css</category>
    </item>
    <item>
      <title>A Step-by-Step Guide to Building a Responsive and Mobile-Friendly website from scratch</title>
      <dc:creator>Adegboyega Adedamola Wilson</dc:creator>
      <pubDate>Sun, 13 Aug 2023 10:33:21 +0000</pubDate>
      <link>https://dev.to/wilsonadedamola/a-step-by-step-guide-to-building-a-responsive-and-mobile-friendly-website-from-scratch-h51</link>
      <guid>https://dev.to/wilsonadedamola/a-step-by-step-guide-to-building-a-responsive-and-mobile-friendly-website-from-scratch-h51</guid>
      <description>&lt;h3&gt;
  
  
  A Web developer’s step-by-step guide to creating and designing websites that are fully responsive in the multi-device world we are in today
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Table of content
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;Prerequisite&lt;/li&gt;
&lt;li&gt;What is website responsiveness?&lt;/li&gt;
&lt;li&gt;Implementing media queries for different screen sizes&lt;/li&gt;
&lt;li&gt;Optimizing images and assets for faster mobile loading&lt;/li&gt;
&lt;li&gt;Testing on various devices and browsers for cross-device compatibility&lt;/li&gt;
&lt;li&gt;HTML and CSS best practices for responsiveness&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Introduction
&lt;/h4&gt;

&lt;p&gt;We live in a multi-device world, and because of this, front-end developers must build fully equipped, compatible, and responsive websites on all devices. In this guide, we will learn how to build responsive and mobile-friendly websites.&lt;/p&gt;

&lt;h4&gt;
  
  
  Prerequisite
&lt;/h4&gt;

&lt;p&gt;This guide is for people with basic knowledge of HTML and CSS, If you are not familiar with these you must familiarize yourself with them before going through this guide.&lt;/p&gt;

&lt;h4&gt;
  
  
  What is website responsiveness?
&lt;/h4&gt;

&lt;p&gt;First, we will understand what responsiveness is.&lt;br&gt;
Responsiveness is the ability of the interface of a website or application to change or adapt to changes in the environment or device.&lt;/p&gt;

&lt;p&gt;Now we will understand what website responsiveness is.&lt;br&gt;
Website responsiveness popularly known as responsive web design focuses on creating websites that automatically adjust and optimize their layout and content based on the screen size and device used to access the website.&lt;br&gt;
Contents like images, texts, videos, and navigation bars automatically resize themselves to fit the screen size of the device being used to access the website. This is essential for optimal user interaction and experience on the website.&lt;/p&gt;

&lt;h4&gt;
  
  
  Implementing media queries for different screen sizes
&lt;/h4&gt;

&lt;p&gt;What are media queries?&lt;br&gt;
Media queries are CSS(cascading style sheets) rules that allow web developers to create responsive websites. Media queries allow web developers to conditionally apply styles based on the device or browser screen size, orientation, and resolution.&lt;br&gt;
For example, they can apply styles for small screen sizes (280px-760px), medium screen sizes (760px-1440px), and large screen size (1440px and above), doing this makes the website adjust automatically to different screen sizes and layouts.&lt;/p&gt;

&lt;p&gt;Use the '&lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt;' rule followed by the condition you want it to meet and the styles you wish to apply to implement the media query. An example of this will be shown below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fuijmvod2lvtmevbh5i0m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fuijmvod2lvtmevbh5i0m.png" alt="Media query usage"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The image above shows the '&lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt;' rule, followed by the condition, and the styles to be applied.&lt;/p&gt;

&lt;h4&gt;
  
  
  Optimizing images and assets for faster mobile loading
&lt;/h4&gt;

&lt;p&gt;Optimizing images and assets for faster mobile loading involves compressing and reducing file size, and improving the efficiency of images to ensure that assets load faster. Below are techniques and tips which you can use to optimize images and assets for faster loading:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Lazy Loading: Lazy loading simply means delaying image loading until it the image becomes visible to the user. This enables the initial load of the page to be faster, and loads only the image in the user’s viewport&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use the proper image format: Using the proper image format enables your website to load faster on mobile. The popular image formats are:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;PNG: PNG is preferred for images with transparency such as logos.&lt;/li&gt;
&lt;li&gt;JPEG: JPEG is the best choice for photographs and images with many colors.&lt;/li&gt;
&lt;li&gt;SVG: SVG(Scalable Vector Graphics) is the best choice for icons or simple graphics on your website. &lt;/li&gt;
&lt;li&gt;WebP: WebP provides high-quality images with lower file sizes, but not all browsers support this format. It is recommended to use this format if the web browser supports the format.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Compress images: This involves the use of image compressing tools to significantly reduce the size of an image while keeping its original quality.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use responsive image: Use of ‘’ tag, and CSS media queries enables you to serve suitable and different images for different devices or screen sizes. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use SVG icons or Icon fonts: Using image files for icons can increase your website load time because of their sizes, instead use icon fonts or SVG icons. These are some examples of icon fonts and SVG fonts: IcoMoonApp, Material Design, Font Awesome, free Icons, and Icon Packs. They are scalable and have lower file sizes compared to using image files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Test and Monitor: Test and Monitor simply means using tools like WebPageTest, Google PageSpeed Insights, or GTmetrix to test and monitor your current load speed and ensure necessary improvements are made.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Testing on various devices and browsers for cross-device compatibility
&lt;/h4&gt;

&lt;p&gt;Testing on various devices and browsers for cross-device compatibility simply means ensuring that your website appears and functions well on different devices and browsers, ensuring users enjoy a smooth experience on any device or browser they use.&lt;br&gt;
Below are some examples of testing tools:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Browser DevTools&lt;/li&gt;
&lt;li&gt;CrossBrowser Testing&lt;/li&gt;
&lt;li&gt;Lambda Test&lt;/li&gt;
&lt;li&gt;Screenfly&lt;/li&gt;
&lt;li&gt;BrowserStack&lt;/li&gt;
&lt;li&gt;Sauce Labs&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These tools enable developers to ensure that their website works effectively on multiple devices.&lt;br&gt;
By testing for cross-device compatibility web developers detect issues with their websites and fix them.&lt;/p&gt;

&lt;h4&gt;
  
  
  HTML and CSS best practices for responsiveness
&lt;/h4&gt;

&lt;p&gt;Below are some tips on best practices for responsiveness:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use media queries appropriately&lt;/li&gt;
&lt;li&gt;Use relative units like 'vh', 'vw', and '%' instead of fixed pixels, this ensures that elements resize according to the screen size.&lt;/li&gt;
&lt;li&gt;Use CSS Flexbox or Grid for creating responsive layouts.&lt;/li&gt;
&lt;li&gt;Use relative font sizes like 'em' and 'rem'.&lt;/li&gt;
&lt;li&gt;Apply the mobile-first approach.&lt;/li&gt;
&lt;li&gt;Compress images with large file sizes to reduce page load time.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Following this best practice will help you to create websites that are responsive easily.&lt;/p&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;In conclusion, it is vital as a Web developer for your websites to be compatible and fully responsive on all devices. Following the techniques in this guide will enable you to build responsive websites that are mobile-friendly and compatible with all devices.&lt;br&gt;
Now that you have learned how to build responsive websites, consider learning the significance of responsive design in a multi-device world.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>frontend</category>
      <category>css</category>
    </item>
    <item>
      <title>Form validation in React is made simpler by using JavaScript libraries</title>
      <dc:creator>Adegboyega Adedamola Wilson</dc:creator>
      <pubDate>Wed, 09 Aug 2023 18:33:24 +0000</pubDate>
      <link>https://dev.to/wilsonadedamola/form-validation-in-react-is-made-simpler-by-using-javascript-libraries-3ghe</link>
      <guid>https://dev.to/wilsonadedamola/form-validation-in-react-is-made-simpler-by-using-javascript-libraries-3ghe</guid>
      <description>&lt;h3&gt;
  
  
  A Web developer’s step-by-step guide to implementing JavaScript libraries for validating forms.
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Table of Content
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Introduction&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Prerequisite&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is form validation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Creating a form in React&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Top 4 form validation libraries&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Validating a React form with a library&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Conclusion&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Introduction
&lt;/h4&gt;

&lt;p&gt;Almost all available website in the world has a form. Therefore it is important to get the correct details filled in those forms. In this guide, we will learn what form validation is and how to validate forms more easily by using JavaScript libraries.  &lt;/p&gt;

&lt;h4&gt;
  
  
  Prerequisite
&lt;/h4&gt;

&lt;p&gt;This guide is aimed at people with basic HTML, JavaScript, and React knowledge. If you are not familiar with these we recommend you to familiarize yourself with them before going through this guide.&lt;/p&gt;

&lt;h4&gt;
  
  
  What is form validation?
&lt;/h4&gt;

&lt;p&gt;Form validation is the process of making sure that the text or details that a user is inputting into a form are in the correct format and within the restrictions of the application. For example, an email field is required to have at least one ‘@’ and one ‘.’, if the user inputs an email without ‘@’ the validation process kicks in and informs the user that the inputted email is invalid. The same process and rules go for other fields in your form.&lt;/p&gt;

&lt;h4&gt;
  
  
  Creating a form in React
&lt;/h4&gt;

&lt;p&gt;In this part, we are going to create a simple react form.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eztoClSX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pzn8xatcmbw1vj9ouf0f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eztoClSX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pzn8xatcmbw1vj9ouf0f.png" alt="A simple react form code " width="800" height="837"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the above image, we can see the code of a simple React form.&lt;br&gt;
After setting up our environment, we have our form tag, input tag, and placeholder. (Ignore the tailwind styles from the above picture, it is there just to add little styles to form which we will see in the output below).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OcziFMKv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7arxn6skziawv5d2vc23.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OcziFMKv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7arxn6skziawv5d2vc23.png" alt="A simple react form image" width="781" height="527"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Above we have the output of our simple React form, displaying the Name, Email, and password just as it is written in the code.&lt;/p&gt;
&lt;h4&gt;
  
  
  Top 4 form validation libraries
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;React Hook Form&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zNCIajLs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jqjd9875p1tct9k895j7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zNCIajLs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jqjd9875p1tct9k895j7.png" alt="React Hook Form logo" width="800" height="313"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;React Hook Form is a lightweight, flexible easy-to-use form validating library. React Hook Form reduces the amount of code you need to write while removing unnecessary re-renders.&lt;br&gt;
Features of React Hook Form:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Minimal re-renders&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Flexibility&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Useable with external UI Libraries&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Form State Management&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Error Handling&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Built-in Validation Rules&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Formik&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dmnaeFh5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ll556jr5g5jxrtyg5vjt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dmnaeFh5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ll556jr5g5jxrtyg5vjt.png" alt="Formik logo" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Formik is another popular and open-source form validation library. It offers a set of easy-to-understand components and utilities for form management and validation&lt;br&gt;
Features of Formik:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Declarative API&lt;/li&gt;
&lt;li&gt;Well documented&lt;/li&gt;
&lt;li&gt;Large and active community&lt;/li&gt;
&lt;li&gt;Error handling&lt;/li&gt;
&lt;li&gt;Asynchronous validation&lt;/li&gt;
&lt;li&gt;Validation schema integration&lt;/li&gt;
&lt;li&gt;Form events&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Yup&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LRn7UNfV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mz7s4myb2o4vm6irj8vx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LRn7UNfV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mz7s4myb2o4vm6irj8vx.png" alt="Yup logo" width="318" height="159"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yup is a form validation library used in conjunction with form management libraries to handle form validation.&lt;br&gt;
Features of Yup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Asynchronous validation&lt;/li&gt;
&lt;li&gt;Conditional validation&lt;/li&gt;
&lt;li&gt;Declarative Validation&lt;/li&gt;
&lt;li&gt;Flexibility&lt;/li&gt;
&lt;li&gt;Schema-based validation&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;React Final Form&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0oPQhMMA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c0i0zprldqr8rar92ciq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0oPQhMMA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c0i0zprldqr8rar92ciq.jpg" alt="React Final Form logo" width="320" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;React Final Form is a form validation library for managing complex forms in React. It is suited for projects that require robust form validation, asynchronous form submissions, and dynamic form fields.&lt;br&gt;
Features of React Final Form:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Asynchronous validation&lt;/li&gt;
&lt;li&gt;Validation schema integration &lt;/li&gt;
&lt;li&gt;Form events&lt;/li&gt;
&lt;li&gt;Performance optimizations&lt;/li&gt;
&lt;li&gt;Form state management&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The above libraries are some of the most popular form validation libraries available.&lt;br&gt;
As you continue with this article you will see how you can validate a form with one of the libraries listed above.&lt;/p&gt;
&lt;h4&gt;
  
  
  Validating a React form with a library
&lt;/h4&gt;

&lt;p&gt;In this example, we will use React Hook Form library for the form validation.&lt;br&gt;
To get started with this library, you need to install it with this single-line command below.&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 react-hook-form
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the installation, we can import the ‘useForm’ hook and use it to validate our form.&lt;br&gt;
In the image below we’ll see how we can use the react hook form to validate our form.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HnzIeI8Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/opkiwvqgiilfpyxiej90.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HnzIeI8Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/opkiwvqgiilfpyxiej90.png" alt="Image of React hook form usage" width="800" height="1276"&gt;&lt;/a&gt;Image 1.0&lt;/p&gt;

&lt;p&gt;From the ‘useForm’ hook we can destructure it and get three properties out of it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The ‘Register’ function&lt;/li&gt;
&lt;li&gt;The ‘handleSubmit’ function&lt;/li&gt;
&lt;li&gt;The ‘formState’ object&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The ‘register’ is a call-back function that returns props and is used to register the input fields.&lt;br&gt;
When an input is registered the form can track its validation process and other properties.&lt;br&gt;
The ‘handleSubmit’ function is passed to the ‘onSubmit’ event handler in your form tag, and this function handles the validation process and form submission for all registered inputs when the submit button is clicked passing the 'data' as an argument as you can see in image 1.0 above.&lt;br&gt;
The ‘formState’ object contains multiple properties, but we use the ‘errors’ property in this example.&lt;br&gt;
The ‘errors’ property contains validation errors if the details inputted in the input fields are not according to the rules you set, as you can see in image 1.0 above.&lt;br&gt;
To make any input field required, you can add the ‘required’ object with the ‘message’ you want to display to the input field as seen in image 1.0 above.&lt;/p&gt;

&lt;p&gt;The image below shows the result if the input field is empty&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Rt839L79--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i77k3bmp8vlw5ezmivlz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Rt839L79--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i77k3bmp8vlw5ezmivlz.png" alt="Error image of an empty input field of a react form" width="751" height="565"&gt;&lt;/a&gt;Image1.1&lt;/p&gt;

&lt;p&gt;When it comes to validating an email field you will need a regular expression, the regular expression is stored in the ‘pattern’ object as seen in image 1.0 above as well as the error message you want to display.&lt;/p&gt;

&lt;p&gt;The image below shows the result if the email format provided is invalid&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--z1E_KMYq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ztv10nxi7ucwgrtygnrz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z1E_KMYq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ztv10nxi7ucwgrtygnrz.png" alt="Error image of an invalid email input field of a react form" width="731" height="462"&gt;&lt;/a&gt;Image 1.2&lt;/p&gt;

&lt;p&gt;As we can see from the image above, the email provided does not have a “.com” so it displayed the error message we stored in the ‘pattern’ object.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--64Z7qxZ3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g038senjxp5vkvjmwwdr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--64Z7qxZ3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g038senjxp5vkvjmwwdr.png" alt="Validity image of filled input fields of a react form" width="781" height="465"&gt;&lt;/a&gt;&lt;br&gt;
As we can see in the image above, the data fields are not empty and the details inputted into the fields are in the right format so there are no error messages.&lt;/p&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;In conclusion, it is important to make sure that your forms are properly validated and the JavaScript libraries listed above are a very good and easy way to validate your web forms.&lt;/p&gt;

&lt;p&gt;Now that you have learned how to use JavaScript libraries to validate your form, consider learning how to send email from an HTML contact form without any server code.&lt;/p&gt;

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