React with .NET Web API – Basic App Tutorial



React with .NET Web API – Basic App Tutorial

React with .NET Web API – Basic App Tutorial

Learn how to create a basic React application that leverages a .NET Web API Component (that we write using C#). In order to integrate React with a .NET Web API component we utilise the ‘ASP.NET Core with React.js’ project template from within the free version of Visual Studio 2022 (the community edition).

The App that we build enables users to rank items by dragging and dropping the items (displayed in a list) to a cell position on the ranking grid (the grid is positioned above the list of relevant items). Each cell position on the grid denotes a ranking value for e.g. the top left cell is position number 1, denoting the top ranked item, the cell positioned to the immediate right of this cell denotes the 2nd ranked item and so on…the bottom right cell denotes the worst possible ranking position. So this is a fun app to code that will give a learner an insight into how to build a simple app using React on the front-end that leverages a .NET Web API component on the backend.

⚙️ Code: https://github.com/GavinLonDigital/RankingApp

✏️ Gavin Lon created this tutorial. Check out his channel: @GavinLon

⭐️ Contents ⭐️
⌨️ (0:00:00) Introduction
⌨️ (0:01:54) Project Creation
⌨️ (0:05:47) Create the Server-side .NET Web API Code in C#
⌨️ (0:13:38) Create ‘RankItems’ React Component
⌨️ (0:20:11) Create Navigation Functionality
⌨️ (0:27:13) Write Code to Import Movie Images
⌨️ (0:31:31) Write Code to Display Movie Images
⌨️ (0:37:32) Write Code for ‘RankingGrid’ React Component
⌨️ (0:52:21) Write Code for Drag and Drop Functionality
⌨️ (1:15:26) Write Code for Ranking Albums
⌨️ (1:36:20) Write Code for Initialising Ranking Items (Reload Button)

🎉 Thanks to our Champion and Sponsor supporters:
👾 Nattira Maneerat
👾 Heather Wcislo
👾 Serhiy Kalinets
👾 Erdeniz Unvan
👾 Justin Hual
👾 Agustín Kussrow
👾 Otis Morgan

Learn to code for free and get a developer job: https://www.freecodecamp.org

Read hundreds of articles on programming: https://freecodecamp.org/news