A straightforward guide to using React Hooks for global state management

Cartoon turtle: “I don’t always replace Redux, but when I do replace Redux… I just write another Redux, muhahaha!”
Cartoon turtle: “I don’t always replace Redux, but when I do replace Redux… I just write another Redux, muhahaha!”
Original artwork by the author.

If you are developing a React application, the most simple way of managing your global state and access to your backend is through React Hooks.

Even though there have been a lot of articles talking about hooks since they were released in React 16.8, it is actually hard to find a guide that explains well how to leverage them to architecture your application.

I will give you the best scalable approach to manage sharing data across your application and working with your backend APIs through React hooks that I am using in all my React apps.

If you are already…

Improve the reusability and performance of JavaScript through functional programming

Turtle comic
Turtle comic
Image by the author.

Currying and higher-order functions represent the basics of functional programming. Because JavaScript directly supports them, they can turn your code into pure magic.

They can have a notable positive impact on the reusability and performance of your code through functional programming.

First-Class Functions

One of the functional programming features of JavaScript is based on the fact that functions are first-class citizens. That means functions can be passed or returned as values like strings or any other type.

These are some very basic examples demonstrating that functions are first-class citizens in JavaScript:

The firstClassType function is what we call identity in…

Definition, props, pure components, inner state, lifecycle, and performance for both class and functional components

cartoon turtle asking what is the difference between class and functional components
cartoon turtle asking what is the difference between class and functional components
Original drawing by the author

React gives you a choice between using a more imperative code style with class components or using the more declarative functional approach with functional components.

The fact that React allows you to create components as pure functions is one of the main reasons why I love the framework.

Define React Component

This is an example of defining a component in React in three different styles.

As you can see, the first one, ClassHelloWorld, is a class component. FunctionHelloWorld is a functional component using a classic function, and ArrowHelloWorld is a functional component using an arrow function.

All three functions are equivalent…

JavaScript is an amazing programming language that allows you to write code in different paradigms or combine them into a multiparadigmatic approach.

I want to take the opportunity to demonstrate different imperative and declarative paradigms, what they look like in real code and what their benefits are.

The most common explanation of the difference between imperative and declarative programming is that imperative code tells the computer how to do things and declarative program focuses on what you want from the computer. …

Routes, 404, links, redirects, asynchronous loading, and more

Drawing of turtle answering questions
Drawing of turtle answering questions
Image by the author.

Many consider React the best overall JavaScript framework for building web applications. One of the basics that you need to master is React routing.

React Router allows your web application to be organized into pages on different URLs, as you are used to with any other pages on the internet. Because React is just one big JavaScript script, all pages are loaded up and displayed immediately when the user clicks a link.

I will cover the basics as well as some advanced tips that include 404 pages, redirects, asynchronous pages, and a site map. …

How to follow values and principles to become Agile.

Agile is a set of four values and twelve principles that aim to uncover better ways of developing software by doing it and helping others do it.

Agile is not considered a methodology because it does not offer any specific methods, processes, rules, or ceremonies that you should adhere to.

If you are looking for actual methodologies, you can consider Extreme Programming, Kanban, or Scrum. But does following any of these actually make you Agile?

A bit of a history

It might seem that logically first there was Agile, and then there were Agile methodologies, but truth be told, it was the other way…

What is servant leadership, and why did The Scrum Guide change its definition?

The 2020 revision of The Scrum Guide has changed the definition of a Scrum Master from a servant leader to a true leader. Even though the guide still talks about how Scrum Master serves the others, it is a change that happened for a reason.

Misunderstanding of the servant leader

The servant-leader is a concept coined by Robert Greenleaf in his essay The Servant as a Leader in 1970. Thus, it is a notion nearly twice as old as Scrum.

However, many companies in the Agile adoption and implementation of the Scrum framework tend to understand it poorly. It has lead to Scrum Masters…

Micromanagement in Agile and Scrum

There are many different ways how Agile adoption happens across different companies. Because I love entertaining people with stories of Agile adoption, I want to focus today on the top 3 micromanagement symptoms in Scrum implementation that might appear like they are a good idea, done with the best of intentions but actually, go against the values and principles of Agile.

Symptom 1: Daily Scrum for daily report

The Daily Scrum is an important 15-minute event that allows the Developers to inspect their work daily and self-manage to plan the next steps towards Sprint Goal delivery.

The Scrum Guide clearly states that it is an event…

Changes in Scrum commitment, grooming, and the team

Do you know that commitment, grooming, or the development team are no longer terms used within The Scrum Guide?

A forecast replaces commitment.

Commitment has been removed from The Scrum Guide in its first revision in 2011 and replaced by a forecast.

The Scrum Teams do not commit to completing the work planned during a Sprint Planning event. The Scrum Team creates a forecast of work it believes will be done, but that forecast will change as more becomes known throughout the Sprint.

The new name reserves the potential for changes during the Sprint, and the company should empower the team to make…

Cross-functional teams in Agile and Scrum

There are many kinds of teams in different organizations. Some teams seem like they are always developing something without ever releasing anything. Other teams are always extremely hard-working while feeling underappreciated because others see them as their bottleneck.

Exceptional teams can generate value with every iteration with nothing to hold back their creativity and engineering excellence. But how can such successful teams be formed in your organization?

Functional vertical teams

Teams are often established around a specific function that they are asked to perform within an organization. For example, you can have a QA team that is purely focused on testing software…

Martin Novak

Martin is a seasoned manager with rich experience in leading international teams and governing product strategies.

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