In this post we will use Github Actions to automatically trigger the following processes on every merge to master or pull request:
We will configure this for both a Front End project and a Back End project.
Managing Form State (holding field information, check if a control has been touched, if the user has clicked the submit button, who owns the current focus…) can be tedious and prone to errors. We can get help from Formik to handle these challenges for us.
Form validation can get complex (synchronous validations, asynchronous validations, record validations, field validations, internationalization, schemas definitions…). To cope with these challenges we will leverage this into Fonk and Fonk Formik adaptor for a Forkmik seamless integration.
In this post we will use Travis to automatically trigger the following processes on every merge to master or pull request:
Fire up a clean linux + nodejs instance. Download the repository source code. Install the project dependencies. Execute the associated unit tests. Generate a docker image including the production build. Tag it and Publish it into the Docker Hub registry.
We will configure this for both a Front End project and a Back End project.
Managing a Form can be darn simple. Just let the user fill in some fields, submit it to the server and if there are any errors notify them and let the user start over again. Is that a good approach? The answer is no, you don't want users to get frustrated waiting for a server round trip to get some form validation result.
With the release of context API in React 16.3 and especially hooks in React 16.8, a new world of possibilites suddenly arose. As we discovered the cleanliness and simplicity of hooks, Redux started to feel like overly complex and verbose with all those containers, reducers, action creators and so on. The question didn't take too long; if new React context was designed to feed a whole component tree with data, wouldn't it be possible to redefine the global state pattern by using native context plus hooks?
Docker has left behind its "buzzword" time. By now it has been deeply incorporated by the industry due to its simplicity for packaging applications and later running applications, especially in distributed systems. In the cloud, Docker avoids having to install tons of dependencies, which makes it really easy to upgrade production systems and their maintenance.
If (almost) everyone is running their applications using containers, especially Docker, I bet you want to learn it, too, right?
Jest has become the de facto standard for building unit tests. Writing tests in JavaScript / TypeScript is fine, but old hands coming from the .net/java/karma approaches will soon start to miss something... How on God's green earth can I debug this? The answer is using Visual Studio Code !! You can just place breakpoints, choose whether or not to make a single run, enable watch mode, or even only execute the tests of the current opened file.
When you are developing your web application, you have to perform asynchronous operations, e.g. perform a fetch/ajax call to obtain data from the server. Sometimes you need to do silent background operations, whereas in other cases you need to block the user interface or notify them that something is going on.
A typical way of handling this, is using a boolean flag to show/hide the spinner...
This post is based on this excellent Gist created by Carlos Hidalgo.
When we use imports one of the most of the things that hurts is working with relative paths. Can you show me an example? Let's imagine we are working with the following folder structure...
C/ Pintor Martínez Cubells 5 Málaga (Spain)
info@lemoncode.net
+34 693 84 24 54
Copyright 2018 Basefactor. All Rights Reserved.