Quick start: ASP.Net Core 3.1, Entity Framework Core, CQRS, React JS Series — Part 13: HttpPut and HttpDelete requests

--

Well organized pieces make it understandable and readable!

Outline

  • Github Repository
  • Updating data with Put Request
  • Deleting data with Delete Request
  • Conclusion

The parent content of this series: Quick start: ASP.Net Core 3.1, Entity Framework Core, CQRS, React JS Series

Github Repository

Updating data with Put Request

Update Project component:

Imports
Component itsels

Update Project function:

Update product function
Render the view

Form fields needs to be updated by fetched data:

Fetch the data in didMount event and set value to the field in willReceiveProps event.

FormFields definition:

In component will mount, form fields needs to be assigned into state object

Deleting data with Delete Request

Delete Tag component:

Imports
Component itself and connecting the reducer
required functions for delete action

Render view:

Conclusion

In this tutorial, “using different lifecycle hooks to fetch data from the server” and “updating the local state” are demonstrated.

Delete action:

Delete tag
Update product

--

--

Ali Süleyman TOPUZ

Software Engineering and Development Professional. Writes about software development & tech. 📍🇹🇷