DEV Community

evenmik
evenmik

Posted on

React Hooks with Typescript : UseCallback, UseMemo, UseContext And UseRef

Lets, check react advanced hooks, i.e. UseCallback, UseMemo, UseRef, and UseContext. All these come under React 16.8 version and help the user create an optimized react application.
Let’s create a react application environment for our project by using either of the following commands:   

1.yarn create react-app advanced-hooks-tutorial --template typescript # or
2.npx create-react-app advanced-hooks-tutorial --template typescript

The above command will create a Project with the name “advanced-hooks-tutorial”. Once it’s done go to the directory and start the project either by “npm start” or “yarn start”.

We will be using yarn throughout this tutorial to maintain consistency.
Let’s now integrate the project with antd which is a design library by the name of antd design, that helps us to create some standard UI components. Additionally, you can use other design libraries as well if you want.

React Hooks with Typescript : UseCallback, UseMemo, UseContext And UseRef

Top comments (2)

Collapse
 
dance2die profile image
Sung M. Kim

Hi evenmik.

We encourage the entire article to be published on DEV.to (if you have proper rights), with a linkback if appropriate. Otherwise, we recommend original material, such as an original commentary on the article. From the Terms of Use:

Users must make a good-faith effort to share content that is...not designed primarily for the purposes of promotion or creating backlinks. Additionally, posts must contain substantial content — they may not merely reference an external link that contains the full post.

Posts that are simply intended to encourage readers to view an external resource are discouraged.

Thank you.

Collapse
 
evenmik profile image
evenmik

Hi Sung M Kim,

Thanks for the valuable feedback. Next time i will surely follow the terms and conditions