2022-06-15T11:48:42Z

The React Mega-Tutorial, Chapter 6: Building an API Client

In Chapter 5, the Posts component was modified to make an API call that gets data from the server. The way it was done, however, does not scale very well, because as the application continues to grow, there's going to be other components that will also need to make their API calls, and having to repeat the API calling logic in several places will be difficult to manage, especially considering that these calls are going to become more complex once authentication and pagination are implemented.

4 comments

2022-06-08T19:02:49Z

Beautiful Flask Tables, Part 2

It's been almost a year since I published my Beautiful Interactive Tables for your Flask Templates article, in which I showed a few example tables, rendered from a standard Flask and Jinja template, with some JavaScript help.

I have received a good amount of feedback on my proposed solutions. In this article I'm going to refresh my table examples to address the two most frequently requested improvements.

8 comments

2022-06-02T18:25:35Z

The React Mega-Tutorial, Chapter 5: Connecting to a Back End

In this chapter you are going to learn how the React application can communicate with a back end application to request data. While doing this, you will learn how to use the two most important React hooks: useState() and useEffect().

2022-05-16T16:04:35Z

The React Mega-Tutorial, Chapter 4: Routing and Page Navigation

React is a Single-Page Application (SPA) framework, which means that from the point of view of the browser, only one web page is ever downloaded. Once that page is active, all the application state changes will happen through JavaScript events, without the browser having to fetch new web pages from the server. How then, can the application support page navigation?

2022-05-01T15:27:44Z

The React Mega-Tutorial, Chapter 3: Working with Components

In Chapter 2, you wrote your first React component. In this chapter you will delve deeper into React as you learn how to create robust applications by combining and reusing components, not only your own but also some imported from third-party libraries.

8 comments

2022-04-16T14:22:32Z

The React Mega-Tutorial, Chapter 2: Hello, React!

In this chapter you will take your first steps as a React developer. When you reach the end you will have a first version of a microblogging application running on your computer!

7 comments

2022-04-02T10:18:17Z

The React Mega-Tutorial, Chapter 1: Modern JavaScript

The JavaScript language has evolved significantly in the last few years, but because browsers have been slow in adopting these changes a lot of people have not kept up with the language. React encourages developers to use modern JavaScript, so this chapter gives you an overview of the newest features of the language.

15 comments

2022-04-02T10:13:14Z

Introducing the React Mega-Tutorial

Welcome to the React Mega-Tutorial! In this series I will share my experience in developing real-world, non-trivial front end applications using the React library and a handful of related packages.

Unlike most other books and tutorials, the React Mega-Tutorial will take you on a development journey. Instead of teaching you React concepts with isolated examples, it will show you how to develop a complete front end application. You will begin by creating a brand new React project, and then start adding features and functionality to it as you progress through the chapters. When you reach the end, you will have a complete project of which you will understand every single line of code. More importantly, you will understand the concepts and techniques involved in creating it, in way that will be directly applicable to your own projects.

19 comments

2021-12-03T11:03:40Z

API Authentication with Tokens

In this article I'm going to show you a few common patterns for client authentication based on tokens, and how can they be implemented in a Python API back end. This method of authentication works well for rich clients, like JavaScript-based front end applications running in the browser, or perhaps a command-line (CLI) application.

I have written about Authentication several times on this blog, so this article is a bit different. Since I have already provided a few authentication projects in previous articles and in my open source projects, in this article I'm going to go over all the considerations you have to take into account when deciding how to best implement authentication for your own API project.

This article was voted by my supporters on Patreon. Would you like to support my work, and as a thank you be able to vote on my future articles and also have access to a chat room where I hang out? Become a Patron!

8 comments

2021-11-24T18:13:37Z

Using JavaScript-style async promises in Python

When you compare Python and JavaScript async code, you may think they are very much alike, since both use the async/await pattern. In reality, there is a significant difference between the two, which in my opinion, makes the JavaScript async model superior to Python's.

Do you want to know what the difference is, and how to make async Python work like async JavaScript? Watch or read on for the details!

10 comments