Copy
Stay up to date with the latest news on React.
View this email in your browser

The React Newsletter

Hi <<First Name>>,
 
Form validation with React Hooks WITHOUT a library

In the early days of the internet, HTML forms were the first way of interacting with websites. The internet has come a long way since, but forms are still an essential component of any web application.

In React, you can validate forms in many different ways. There are some libraries out there that intend to make this task easier for you.

However, doing it yourself has a few advantages: You have control over the API layout, and since you probably don't need all the features that these libraries come with, you also save some bandwidth. More importantly, though, you get a deeper understanding of the mechanics behind some of these libraries.

In this tutorial, I want to show you how you can create a custom hook that you can use to validate all of your forms. The code for this doesn't need to be huge; in fact, the TypeScript version counts less than 100 lines.

The way I designed this hook fits my personal needs, but your mileage may vary. If you use a different implementation or have suggestions, please leave a comment, as I'm always looking for improvements.


Read more
 
A cleaner API for React TS components

While building taggr, I got deeper into TypeScript, and so far I am loving the added capabilities for annotating types and catching errors at compile time, instead off at runtime.

It can feel daunting and extra work to annotate each component and function at first, but as the codebase grows in size and complexity, the benefits start to shine.

Having the components and business-logic code properly typed, keeps a unique source of truth for the entities of a domain, minimizing the human errors across the application layers.

Plus, TypeScript definitions can be automatically generated from OpenAPIGraphQL schemas… A total win-win 🎉


Read more
 
Build a GLASSMORPHISM React component
In this video, I explain how to create a customizable glassmorphism React component. Glassmorphism is a visual design for glass-like surfaces in user interfaces. Next to showing how to build a glassmorphic element in React, I also show you how to manipulate the style through properties, and how to use the useStyles hook from the Material-UI library to create fully customizable styles. Finally, I add a few nice motion effects to finish the example and give it that sheen that every user desires!

Watch video
 
Gatsby v3 Incremental Builds in OSS, new Gatsby Image, and more

Meet the latest Gatsby

Ever since the very first version of Gatsby we’ve simplified the building of performant React sites for web developers. Optimized loading, prefetching, responsive images, accessible routing, webpack configuration – we made hard problems easier so you can focus on delivering the unique requirements of your website.

Then Gatsby v1.0 brought a unified data layer that simplified working with content from multiple CMS’s. Suddenly you were launching fast sites that could charm website users as well win over content editors. But we knew there was so much more speed to be captured. We did what we could with incremental improvements throughout v2, but achieving the speed we aimed for required a bigger, bolder move. It was time for Gatsby v3.

We believe that you should have a fast development experience, whether you’re working on your personal blog or a 10,000 page client site. And we believe it’s critical that your content editors and website visitors should have an equally great experience, too. A modern website framework should solve your team’s problems, not force you into unnecessary tradeoffs.

That’s why we focused on making Gatsby v3 faster in every way that matters, for everybody – web developers, content editors, and site visitors! Read more about our new features below.


Read more
 
A Better Way to Structure React Projects

Hello, everyone! A lot of e-ink has already been spilt on the relatively easier pickings of “Doing X in React” or “Using React with technology X”.

So instead, I want to talk about the experiences I've had building frontends from scratch at DelightChat and at my previous companies.

These projects require a deeper understanding of React and extended usage in a production setting.


Read more
 
AWS is creating a 'new open source design system' with React

Amazon Web Services has released AWS UI, which the cloud services biz describes as "the first step in a larger process of creating a new open source design system."

The context for this is the open-sourcing of the user interface code for the .NET Porting Assistant, a tool to scan Windows-only .NET Framework applications to discover what needs fixing in order to port them to .NET Core, the open-source version of .NET that runs on Linux.

AWS seems keen to persuade customers to move away from Windows, and referred in its post to the "performance, cost savings, and robust ecosystem of Linux."

Although the Porting Assistant for .NET was already open source, the code for the tool's user interface, which is built using React and Electron, was previously not available. React is a popular JavaScript framework originally developed by Facebook, and Electron is a project for building cross-platform desktop applications with JavaScript, HTML, and CSS.

Why not build a .NET porting tool with .NET? Since .NET Framework applications only run on Windows, you might wonder why AWS would not take advantage of the ability to run .NET Core code on the desktop using Windows Forms, Windows Presentation Foundation, or UWP. Although this is possible, AWS appears to be standardising on JavaScript/TypeScript and to some extent React for its cross-platform user interface components, getting the benefit of being able to share libraries between web and desktop.


Read more
 
React video courses
Because I need to pay my bills 😉
 
Copyright © 2021 ABL - The Problem Solver, All rights reserved.


unsubscribe from this list    update subscription preferences 

Email Marketing Powered by Mailchimp