React Hooks Form

React Hook Form

Braden Niswonger Development Technologies, React Leave a Comment

In this blog, we will explore React Hook Form, an extremely lightweight and effective form building library using React. This open-source, third-party library has no dependencies and can be integrated with most existing forms or libraries. It provides the ability to subscribe to individual components, limiting the frequency of re-renders and making it more efficient.

Below, we will learn some of the basic usages of React Hook Form, some more in-depth features, and then look at an example form integrated with an existing UI library.

Why Functional Programming

James Slaughter Development Technologies, JavaScript, React 1 Comment

React has gotten a little funny of late – a few years ago, it was normal to embrace the Object-Oriented paradigm, writing each component as a class and doing lots of this-binding.

Today, however, hooks and functional components have taken over React, and with it, a style of programming unusual for front-end frameworks is growing in popularity: Functional Programming.

This programming style has been in use for many years: Lisp, Haskell, Clojure, and OCaml are all established, though mainly out of the mainstream, languages with a rich history and broad application. Thinking ‘functions are first-class citizens’ sounds strange, especially to new JavaScript developers who have spent most of their time in Python or Java that come from an Object-Oriented perspective.

That’s why in this post, we will go over the basics of Functional Programming, how we compose functions, a handy implementation of a ‘pipe’ function that will compose functions, the process of currying and functions-as-return-value, and how we can use these concepts in React using Higher-Order Components.

Saving The Environment With React Hooks

Using React Hooks To Save the Environment

James Bradley Node.js, Programming, React Leave a Comment

Every application has some need for environmental variables that are specific to that environment. This can be database connections strings or URL to an API that will vary between the different environments. In React, you can use .env files to define key-value pairs. Then Node will inject these at runtime to be used globally through the process.env.{variable}. In this blog, …