Imaging a data type that can be replicated to any number of nodes, and guarantee consistency, eventually. Well ok, but why? It can be used to sync data between devices, or in a peer-to-peer application. Apple use it in their notes app, for syncing state between devices. It also plays a part in the decentralised web, which some call the web 3.0.

Conflict Free Replicated Data-types (CRDTs) is a data-type that can be replicated, and guarantee consistency, once all data has been sent to other nodes in the system. …

Functional programming is a paradigm that results in cleaner and more concise code, that is easier to maintain, and reduces hard to find bugs. A central concept in functional programming is higher order functions. In JavaScript there is multiple built in higher order functions.

According to Wikipedia a higher order function does one of the following:

Filter

Lets get to it. In enterprise grade software, we sometimes want to filter on cute dogs.

Authentication is a necessary feature for many applications in order to save data specific to a user, and allow access to specific screens. Its usually not worth it to create your own backend authentication system, since its way faster to use existing services, such AWS Cognito, allowing you to focus on features that bring value to your end-users.

In this article I will show you how to use Cognito for handling things such as sign in, sign up, account confirmation, and forgot password. React Navigation will help you create separate navigation for the authentication screens and the application screens. …

Creating a router using React Router is pretty straight forward if you are following the guide provided at reacttraining.com. In the example, there exists a typical scenario where a user must be authenticated to access a protected page. If the user navigates to a protected page without being signed in, it will be prompt to sign in and upon success, the user will be redirected to the protected page it tried to access.

When it comes to using redirects it can be quite cumbersome if you also have Typescript in your frontend stack. …

Creating a collaborative application such as Google Docs, Miro or Figma that lets multiple users work together online is a difficult task. Creating a collaborative app using the same methods one does in single user applications won’t work.

Why you ask. Because you have to ensure consistency, handle crappy internet connections, support offline editing, transfer changes in real-time.

Fortunately, research has been devoted to solving some of these issues. Conflict-Free Replicated data type (CRDT) is is a collection of data types that can be used in a collaborative application, in order ensure consistency. …

Pierre Hedkvist

Software Engineer from Sweden. @pierrehedkvist on twitter.

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