Learn how to easily connect all your components to a single state tree in a robust and pleasant way.

Image for post
Image for post

Those of us nerds developing complex web applications have certainly found themselves looking for a solution to simplify state management across the whole application at some point. Discovering Redux was the light at the end of the tunnel for me, and I hope it can illuminate your path as well.

Requirements

Assuming you’ve already set up a Node development environment, here is a list of everything you’re going to need to successfully finish this tutorial.

If you are new to React, I suggest taking a look at the documentation and learning how to create your first React application with create-react-app before moving on. …


How to manage and save your application state to any kind of storage using redux-persist

Image for post
Image for post

If you’ve ever developed a React application and chose to maintain your state using Redux, at some point you’ve probably contemplated keeping it in local storage so that your user can always return to the same place he was before closing the browser or leaving your website. The redux-persist package makes it extremely easy to do so, and in this article I will show you how to do it.

Requirements

Assuming you’ve already set up a Node development environment, here is a list of everything you’re going to need to successfully finish this tutorial.

If you are new to React, I suggest taking a look at the documentation and learn how to create your first React application with create-react-app before moving on. I’ll be typing my components in this tutorial, so a little knowledge of Typescript won’t hurt. …


Step up your React game by learning how to connect your components to your store while isolating rendering from state management logic

Image for post
Image for post

Even if you’re relatively new to programming, you’ve probably heard of the container pattern. By decoupling business logic from the user interface, you make your layout components reusable. In the process of doing this you also have to define what the props for these components look like, improving the clarity of your code and making it break loudly when props don’t match.

In this article, I’m gonna show you how to structure components following a container-like pattern for Redux and Typescript in a way that makes them way easier to read. This will easily and immediately step-up your React game.

Requirements

Assuming you’ve already set up a Node development environment, here is a list of everything you’re going to need to successfully finish this tutorial. …


Pathogens started and ended wars, brought down empires and dictated fashion now and then

Image for post
Image for post

The battle between healthy organisms and infectious agents is one of the longest stories there are to be told, and one that still unfolds. Patterns of behavior that enhance our chances against disease have been favored by natural selection way before anyone knew that microorganisms were a thing.
Modern man is surrounded by inventions, taboos, rituals and traditions that, when looked at more closely, seem to come about or stay around because of the benefit they provide in protecting us against pathogens. …


In this tutorial, we will build a very simple React application that displays a responsive, colorful line chart of temperature data.

Requirements

If you are new to React, I suggest taking a look at the documentation and learning how to create your first React application with create-react-app before moving on. I’ll be typing my components in this tutorial, so a little knowledge of Typescript won’t hurt.

This library offers components built on top of the mighty d3, it’s super easy to use, highly customizable and has the coolest documentation ever. Highly recommended.

npm install --save @nivo/line

This is a very useful library for theming your application and offers ready-to-go components that you can style at will. …


Sometimes we want to serialize our domain objects in a very specific way before they get sent back as responses. Sometimes these ways form a broader pattern among our entities. Annotations could be very helpful in advising our application on how to serialize certain types of objects.

This usually refers to converting an object’s state to a byte stream. But in the context of developing web services, it will usually mean converting the state of our domain objects into Strings that follow certain conventions, like JSON.

public class Position {
double latitude = 0.0
double longitude = 0.0;
}

Serializing this Position object to a JSON string would…


Image for post
Image for post
  • A maven project to be dockerized for deployment. In this tutorial, I’ll be using a Spring Boot application
  • GitHub repository
  • Docker Hub repository
  • Linux machine where your container images will be deployed
  • This tutorial is based on a Trunk Based Development strategy, but you can mold the techniques described below to better suit your branching strategy

We will be creating a GitHub workflow to test, build, and automatically trigger the redeployment of an automatically generated docker container image on a remote server using a Webhook as a trigger.

Getting started

There are many available tools for automating deployment. This approach offers a very simple and straightforward way of achieving it for simple applications running on a remote server. …

About

Arthur Effting

CTO @ accuras

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