step
- Click on the navigation file-> Preferences-> User code snippet
- Click New Code Snippet and enter jsx.json
- After the creation is successful, copy the following code segment into it
- Enter jsx in the jsx file and press the tab key to complete the code
{
"jsx": {
"prefix": "jsx",
"body": [
"import React from 'react'",
"",
"export default class $ 1 extends React.Component {",
" ",
" \ tconstructor () {",
" \ t \ tsuper () ",
" \ t} ",
" ",
" \ trender () {",
" \ t \ treturn (",
" \ t \ t \ t ”,
“\t\t)”,
“\t}”,
“”,
“}”
],
“description”: “jsx components”
}
}