Город МОСКОВСКИЙ
00:54:33

#7 - Create ASP.NET Core Web API and React.js Component using VS Code dotnet Tutorial

Аватар
Реактивный Анализ
Просмотры:
22
Дата загрузки:
28.11.2023 03:53
Длительность:
00:54:33
Категория:
Обучение

Описание

This tutorial continues with Video #4. VS Code .Net Core With React at https://youtu.be/da7pyc918jo

It shows how to:
1. create Web API with .Net Core
2. test your Web API using the browser
3. create React component
4. add your new React Component to the route and menu.
5. call Web API from React component.


On Server Side
============
1. Create 2 Employee Web API methods
Method 1 - Get?id=1
Method 2 - Get/GetAllEmployees
2. Create 2 files
EmployeeController.js
Employee.js


On Client Side
============

1. Create React Employees Component
a. Using Function Component format instead of the Class Component format.

b. Use npx generate-react-cli component Employee to create new component so we need to start from scratch

2. Fetch data from Web API.
Use Hooks
Hooks are a new addition in React 16.8. They let you use state and other React features without writing a class.

a. State Hook
add states to our component with useState

b. Effect Hook
adds the ability to perform side effects from a function component with useEffect

useEffect
Similar componentDidMount, componentDidUpdate, and componentWillUnmount in React classes


Continue your React learning with video #6 - Create React.js App With Bootstrap Using Reactstrap Component in VS Code at
https://youtu.be/eumuHX8Oipc

Рекомендуемые видео