Author: Marinko Spasojevic

React with .NET Core and MySQL – Error Handling and Additional Components

Handling errors while sending HTTP requests towards our server is always a must. This is exactly what we are going to do in this blog post. If the server returns an error with the 404 or 500 status codes, we are going to redirect a user to a specific page. Handling errors which have status codes other than 404 or 500 are going to be executed by using the modal form components. We already have the page for the Not Found (404) error, so let’s continue with the creation of the Internal Server Error (500) component. If you want to...

Read More

React with .NET Core and MySQL – Lazy Loading and HOC Component

In the previous post, we have set up the Redux environment completely and created the Axios instance to send HTTP requests. As a continuation, in this post, we are going to register our Redux repository inside a component and to use it to fetch data from the server. Furthermore, we are going to load our component lazily to demonstrate the advantage of the lazy content loading. If you want to see all the basic instructions and complete navigation for the .NET Core series, check out the following link: Introduction to the .NET Core series. For the complete navigation and all the basic...

Read More

React with .NET Core and MySQL – HTTP, Axios, Redux

In this post, we are going to explain how to send HTTP requests from React. We can send requests from every component but we are going to do that by centralizing the HTTP logic as some kind of a repository. For this type and size of the project, the centralized solution fits perfectly fine. But if you have a larger and more complicated project it would be a good practice to split repository files, and thus, splitting the states. We are going to use axios as a third party library to send HTTP requests and Redux for centralizing the repository logic....

Read More

React with .NET Core and MySQL – Navigation and Routing

Even though we generate all of our components inside just one page, we still need a navigation to load these different components inside our index.html. The React Router enables this navigation functionality for our project. We are going to create three menu options: Home, Owner Actions, and Account Actions. This will be enough for us to see how navigation works in React and how to set up a lazy load functionality for an async component loading inside the project. If you want to see all the basic instructions and complete navigation for the .NET Core series, check out the following link: Introduction...

Read More

React with .NET Core and MySQL – Preparing the Project and Creating Components

Creating the server part (.NET Core Web API part) is just a half of the job we want to accomplish. From this point onwards, we are going to dive into the client side of the application to consume the Web API part and show the results to a user by using React components and many other features. So let’s dive right into it. If you want to see all the basic instructions and complete navigation for the .NET Core series, check out the following link: Introduction to the .NET Core series. For the complete navigation and all the basic instructions of the...

Read More