Archive: 2022

0

Errors

Wrong choice in Nest Throwing an exception Use library-specific response objects Create interceptors and use exception filters Additionally, nest has helper methods for all common error responses,

0

Service

Create service When creating a service, first enter nest generate service, abbreviated nest g s. Enter the name after that. service is used to process logic and can be reused after being extracted.

0

Pagination @Put(), @Delete()

Status code problem Nest will give a default status code of 200 when the request is successful. But we can also customize the status code and return. Nest does not need to memorize all status codes,

0

Controller, @Get(), @Post()

Generate a controller by running the Nest CLI Command: nest generate controller, which can be abbreviated as nest g co. Then enter the name of the controller. (If you don’t want to generate test fil

0

Introduction to Nest.js

Difference between NestJS and NodeJS NestJS is a framework that lets programmers focus on the application problem at hand rather than the tiny implementation details like setting up TypeScript, API

0

Custom hooks

Where to use With custom Hooks, component logic can be extracted into reusable functions. React Hooks means that components should be written as pure functions as much as possible. If external funct

0

List of My VSCode plugins

Auto Close Tag Auto Rename Tag HTML Snippets Babel ES6/ES7 Debugger for Chrome ESLint JavaScript (ES6) code snippets Code Spell Checker Node.js Modules Intellisense React-Native/React/

0

useEffect

useEffect() side effects Pure functions can only perform data calculations. Where should operations that do not involve calculations (such as generating logs, storing data, changing application stat

0

useState

Basic usage 1const [count, setCount] = useState(initialState) count is to read state, setCount is to update state, and initialState is initial value. ​ State is an array Because React renderin

0

Responsive design

Responsive Layout One page corresponds to multiple devices. When the device screen/pc webpage size changes, the page layout (not the element/text size) will be changed automatically. There