This is the code repository for ASP.NET Core 5 and React - Second Edition, published by Packt.
Full-stack web development using .NET 5, React 17, and TypeScript 4
The book starts by taking you through React and TypeScript components for building an intuitive single-page application and then shows you how to design scalable REST APIs that can integrate with a React-based frontend. Next, you’ll get to grips with the latest features, popular patterns, and tools available in the React ecosystem, including function-based components, React Router, and Redux. As you progress through the chapters, you'll learn how to use React with TypeScript to make the frontend robust and maintainable and cover key ASP.NET 5 features such as API controllers, attribute routing, and model binding to build a sturdy backend. In addition to this, you’ll explore API security with ASP.NET 5 identity and authorization policies and write reliable unit tests using both .NET and React, before deploying your app on Azure. By the end of this book, you’ll have gained the knowledge you need to enhance your C# and JavaScript skills and build full-stack, production-ready applications with ASP.NET 5 and React.
This book covers the following exciting features:
- Build RESTful APIs with .NET 5 using API controllers
- Secure REST APIs with identity and authorization policies
- Create strongly typed, interactive, and function-based React components using Hooks
- Understand how to style React components using Emotion.js
- Perform client-side state management with Redux
- Run a range of automated tests on the frontend and backend
- Implement continuous integration and continuous delivery (CI/CD) processes in Azure using Azure DevOps
If you feel this book is for you, get your copy today!
All of the code is organized into folders. For example, Chapter02.
The code will look like the following:
if (test expression)
{
Statement upon condition is true
}
Following is what you need for this book: If you're a web developer looking to get up to speed with full-stack web application development with .NET Core and React, this book is for you. Although the book does not assume any knowledge of React, a basic understanding of .NET Core will help you to get to grips with the concepts covered.
With the following software and hardware list you can run all code files present in the book (Chapter 1-15).
Chapter | Software required | OS required |
---|---|---|
1 to 15 | Visual Studio 2019 | Windows, Mac OS X, and Linux (Any) |
1 to 15 | .NET Core 5 | Windows, Mac OS X, and Linux (Any) |
1 to 15 | Visual Studio Code | Windows, Mac OS X, and Linux (Any) |
1 to 15 | Node.js 8.2 or greater and npm 5.2 or greater | Windows, Mac OS X, and Linux (Any) |
1 to 15 | SQL Server Express Edition | Windows, Mac OS X, and Linux (Any) |
1 to 15 | SQL Server Management Studio | Windows, Mac OS X, and Linux (Any) |
1 to 15 | Google Chrome | Windows, Mac OS X, and Linux (Any) |
Click on the following link to see the Code in Action:
- Page 67: Please ignore/remove points 6 & 7. As these steps are replicated from steps 2 and 3. At this point they have been completed already.
- Page 70: When creating the .prettierrc file in step 4, there is a missing comma at the end of the line that reads,
"trailingComma": "all"**
. So, this line should be replaced with"trailingComma": "all",
- Page 114: If using React 17+, it may appear that a “double render” doesn’t occur because “rendered” is output to the console once. A “double render” does occur but React suppresses
console.log
statements in the second render. See the note at the bottom of this React doc for more information: https://reactjs.org/docs/strict-mode.html
-
An Atypical ASP.NET Core 5 Design Patterns Guide [Packt] [Amazon]
-
C# 9 and .NET 5 – Modern Cross-Platform Development - Fifth Edition [Packt] [Amazon]
Carl Rippon has been involved in the software industry for over 20 years, developing a complex line of business applications across various sectors. He has spent the last 9 years building single-page applications using a wide range of JavaScript technologies, including Angular, ReactJS, and TypeScript. Carl has written over 150 blog posts on various technologies.
If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.