Author: Marinko Spasojevic

React with .NET Core and MySQL – Dynamic Form Creation and Modal Components

In this post, we are going to create a new form component for the post actions and modal components to display success and error messages. We are going to reuse them in every parent component that needs those modal components. Furthermore, we are going to create all the input fields from the config file dynamically, since we want to make our code reusable. So, let’s start. 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...

Read More

ASP.NET Core Web API Best Practices

While we are working on a project, our main goal is to make it work as it supposed to and fulfill all the customer’s requirements. But wouldn’t you agree that creating a project that works is not enough? Shouldn’t that project be maintainable and readable as well? It turns out that we need to put a lot more attention to our projects to write them in more readable and maintainable way. The main reason behind this statement is that probably we are not the only ones who will work on that project. Other people will most probably work on...

Read More

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