This repository contains custom code snippets which you could easily use with code editor of your choice.
-
Create a react component with redux connect and hooks.
Prefix: redux
- Creates funtional component
- Automatically imports useEffect, useState and connect
- Methods like mapStateToProps and mapDisaptchToProps are created to save further time
- Component is wrapped with connect HOC
-
Create a React Functional Component.
Prefix: rfc
- Creates funtional component
- Automatically imports useEffect & useState
- Name of the function will be auto generated from FileName
-
Create a React Class Component.
Prefix: rcc
- Creates class component
- Automatically create a state (with dropdown feature to select type of state [ ] | '' | null)
- Name of the function will be auto generated from FileName
- Navigate to
File > Preferences > User Snippets
- Select JavaScript(JS) as language and
javascript.json
file would be opened. - Replace or Amend the contents of the file with repository's
javascript.json
file.