How to add validations to React Hook Form

Photo by Esther Jiao on Unsplash

Validating our form

Here we have a very simple form with an uncontrolled input component being wrapped by a Controller and assigned to the username value by the name prop. …


Photo by Robin Jonathan Deutsch on Unsplash
  • How to test axios?
  • How to test API calls fired from a useEffect hook?
  • How to test API calls from React Query?

Scenario

Let’s imagine that we have a component that will fire an API request either being through the useEffect hook or a useQuery custom…


Photo by Amol Tyagi on Unsplash

Auth0 dashboard

So the first thing you need is an Auth0 account. You can sign up for free at https://auth0.com/signup.


Improving your Git experience

Photo by Peppy Toad on Unsplash

What are Git Aliases?

Git aliases allow you to reduce the amount of text you write when trying to execute certain commands or a chain of commands. For example, imagine you are doing you are running the push — force-with-lease command. This can get really repetitive…


Photo by Christopher Gower on Unsplash

What is MSW?


Photo by Micah Williams on Unsplash

Setup

Auth0 dashboard


It is that simple to manage server state.

Photo by Fachy Marín on Unsplash


Lessons learned: are React hooks ready for the real world?

(Photo by Dawid Zawiła on Unsplash)

Some context

At Talkdesk, in the past year, the WFM Frontend Team decided to migrate their React application to functional components and start using React Hooks.


Are they really the same?

Photo by Hello I’m Nik 🇬🇧 on Unsplash

this and arguments

this

Let’s look at the following anonymous function example called by setTimeout after 1000 milliseconds. Inside of it, we log the hello variable value and the hello property assigned to this.

A function using this


Photo by Tim Dennert on Unsplash
someContext.js
  • A useRandomContext custom hook
  • A randomStore where we create two state variables and an effect that when the something variable content changes…

Daniel Afonso

Giving back to the community while coding | Senior Frontend Engineer @cera_care | Prev. @talkdesk and @farfetch | @Auth0Ambassador

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store