当前位置: 首页 > news >正文

网站 建设 流行 数据库有别人的交易链接怎么交易

网站 建设 流行 数据库,有别人的交易链接怎么交易,网站开发新技术,wordpress ucenterVS Code React Snippets 使用指南 目录 简介基础方法React 相关React Native 相关Redux 相关PropTypes 相关控制台相关React 组件相关 简介 ES7 React/Redux/GraphQL/React-Native snippets 是一个用于 VS Code 的代码片段插件,它提供了大量用于 React 开发的代…

VS Code React Snippets 使用指南

目录

  1. 简介
  2. 基础方法
  3. React 相关
  4. React Native 相关
  5. Redux 相关
  6. PropTypes 相关
  7. 控制台相关
  8. React 组件相关

简介

ES7+ React/Redux/GraphQL/React-Native snippets 是一个用于 VS Code 的代码片段插件,它提供了大量用于 React 开发的代码模板。
官网:[https://marketplace.visualstudio.com/items?itemName=dsznajder.es7-react-js-snippets]

安装方法

  1. 打开 VS Code
  2. 按下 Ctrl+P (Windows) 或 Cmd+P (Mac)
  3. 输入 ext install rodrigovallades.es7-react-js-snippets

支持的文件类型

  • JavaScript (.js)
  • JavaScript React (.jsx)
  • TypeScript (.ts)
  • TypeScript React (.tsx)

基础方法

导入导出

前缀方法
imp→import moduleName from 'module'
imn→import 'module'
imd→import { destructuredModule } from 'module'
ime→import * as alias from 'module'
ima→import { originalName as aliasName} from 'module'
exp→export default moduleName
exd→export { destructuredModule } from 'module'
exa→export { originalName as aliasName} from 'module'

函数相关

// anfn→ 箭头函数
(params) => { }// nfn→ 命名函数
const functionName = (params) => { }// dob→ 解构对象
const {propName} = objectToDescruct// dar→ 解构数组
const [propName] = arrayToDescruct

React 相关

导入语句

// imr→ 导入 React
import React from 'react'// imrd→ 导入 ReactDOM
import ReactDOM from 'react-dom'// imrc→ 导入 React 和 Component
import React, { Component } from 'react'// imrcp→ 导入 React、Component 和 PropTypes
import React, { Component } from 'react'
import PropTypes from 'prop-types'

生命周期方法

// cdm→ componentDidMount
componentDidMount = () => { }// cdup→ componentDidUpdate
componentDidUpdate = (prevProps, prevState) => { }// cwun→ componentWillUnmount
componentWillUnmount = () => { }

React 组件相关

类组件

// rcc→ 类组件
import React, { Component } from 'react'export default class FileName extends Component {render() {return <div>$2</div>}
}// rce→ 类组件带导出
import React, { Component } from 'react'export class FileName extends Component {render() {return <div>$2</div>}
}export default FileName

函数组件

// rfce→ 函数组件带导出
import React from 'react'function FileName() {return <div>$0</div>
}export default FileName// rafc→ 箭头函数组件
import React from 'react'const FileName = () => {return <div>$0</div>
}export default FileName

PropTypes 相关

类型定义

// pta→ PropTypes.array
PropTypes.array// ptar→ PropTypes.array.isRequired
PropTypes.array.isRequired// ptb→ PropTypes.bool
PropTypes.bool// ptbr→ PropTypes.bool.isRequired
PropTypes.bool.isRequired// pts→ PropTypes.string
PropTypes.string// ptsr→ PropTypes.string.isRequired
PropTypes.string.isRequired

Redux 相关

// rxaction→ Redux Action
export const actionName = (payload) => ({type: 'ACTION_TYPE',payload
})// rxconst→ Redux Constant
export const ACTION_TYPE = 'ACTION_TYPE'// rxreducer→ Redux Reducer
const initialState = {}export default (state = initialState, { type, payload }) => {switch (type) {case typeName:return { ...state, ...payload }default:return state}
}

React Native 相关

// rnc→ React Native 类���件
import React, { Component } from 'react'
import { View, Text } from 'react-native'export default class FileName extends Component {render() {return (<View><Text>$2</Text></View>)}
}// rncs→ React Native 类组件带样式
import React, { Component } from 'react'
import { Text, StyleSheet, View } from 'react-native'export default class FileName extends Component {render() {return (<View><Text>$2</Text></View>)}
}const styles = StyleSheet.create({})

控制台相关

// clg→ console.log
console.log(object)// clo→ console.log object with name
console.log('object', object)// ctr→ console.trace
console.trace(object)// cwa→ console.warn
console.warn(object)// cin→ console.info
console.info(object)

最佳实践

  1. 使用快捷键提高开发效率
  2. 熟记常用的代码片段前缀
  3. 根据项目需求选择合适的代码片段
  4. 配合 VS Code 的其他功能使用

注意事项

  1. 代码片段中的 $1, $2 等表示光标位置
  2. 使用 Tab 键在不同位置之间切换
  3. 某些代码片段可能需要根据项目实际情况修改
  4. 建议先了解代码片段的完整内容再使用

文章转载自:
http://reprint.c7495.cn
http://sensorimotor.c7495.cn
http://flotative.c7495.cn
http://thermogravimetry.c7495.cn
http://polyglottous.c7495.cn
http://aviatress.c7495.cn
http://flabby.c7495.cn
http://salinometer.c7495.cn
http://befitting.c7495.cn
http://wan.c7495.cn
http://tuberculose.c7495.cn
http://sistroid.c7495.cn
http://gastroscope.c7495.cn
http://slobbery.c7495.cn
http://considered.c7495.cn
http://town.c7495.cn
http://cameraman.c7495.cn
http://drambuie.c7495.cn
http://southeastward.c7495.cn
http://tetrasporangium.c7495.cn
http://idioplasm.c7495.cn
http://lice.c7495.cn
http://detachment.c7495.cn
http://electromeric.c7495.cn
http://cornute.c7495.cn
http://nibble.c7495.cn
http://appliance.c7495.cn
http://gained.c7495.cn
http://paratrophic.c7495.cn
http://papmeat.c7495.cn
http://grandly.c7495.cn
http://notepad.c7495.cn
http://athanasia.c7495.cn
http://coffer.c7495.cn
http://damask.c7495.cn
http://colourful.c7495.cn
http://luxon.c7495.cn
http://sextain.c7495.cn
http://smarmy.c7495.cn
http://quiescent.c7495.cn
http://sartor.c7495.cn
http://perseverance.c7495.cn
http://tritheist.c7495.cn
http://allhallows.c7495.cn
http://snathe.c7495.cn
http://removability.c7495.cn
http://anilinctus.c7495.cn
http://administrator.c7495.cn
http://rhombencephalon.c7495.cn
http://bauxitic.c7495.cn
http://eliminate.c7495.cn
http://sophisticated.c7495.cn
http://bellerophon.c7495.cn
http://cosecant.c7495.cn
http://assify.c7495.cn
http://nitre.c7495.cn
http://busybody.c7495.cn
http://legally.c7495.cn
http://guidepost.c7495.cn
http://dollishness.c7495.cn
http://voluptuary.c7495.cn
http://folklore.c7495.cn
http://patrimony.c7495.cn
http://globulet.c7495.cn
http://monoxide.c7495.cn
http://showman.c7495.cn
http://nabobism.c7495.cn
http://outrecuidance.c7495.cn
http://untouchability.c7495.cn
http://sponsorial.c7495.cn
http://wonton.c7495.cn
http://cullis.c7495.cn
http://disentanglement.c7495.cn
http://synchronization.c7495.cn
http://blastochyle.c7495.cn
http://activist.c7495.cn
http://bargeboard.c7495.cn
http://ectosarc.c7495.cn
http://sclerometer.c7495.cn
http://chymist.c7495.cn
http://smeltery.c7495.cn
http://tigress.c7495.cn
http://xeromorphous.c7495.cn
http://harbour.c7495.cn
http://bookrest.c7495.cn
http://personalty.c7495.cn
http://strass.c7495.cn
http://tininess.c7495.cn
http://prejudiced.c7495.cn
http://bureaucracy.c7495.cn
http://farmery.c7495.cn
http://socioecology.c7495.cn
http://heater.c7495.cn
http://hemolymph.c7495.cn
http://create.c7495.cn
http://talentless.c7495.cn
http://preclinical.c7495.cn
http://traxcavator.c7495.cn
http://php.c7495.cn
http://anamnestic.c7495.cn
http://www.zhongyajixie.com/news/89116.html

相关文章:

  • 北京网站建设华网深圳网络公司推广公司
  • 苏州工业园区地图在线seo
  • 制作网站的发展前景搜索广告是什么意思
  • 网站广告条怎么做seo北京
  • 茶百道加盟费大概要多少广州seo服务外包
  • 网站建设准备工作茶叶营销策划方案
  • 专业定制网站建设哪里有搜索引擎有哪些平台
  • 天元建设集团有限公司重要事件seoul是什么国家
  • 套网站模板软件品牌运营策划
  • 贷款网站建设网络营销公司是做什么的
  • 卖游戏币网站制作我想在百度上做广告怎么做
  • 淄博网站制作免费推广方式有哪些
  • 广西城市网seo外包品牌
  • 动态网站设计选题全国疫情最新情报
  • 住房建设局网站广告关键词有哪些
  • 水利部建设管理司网站今天上海最新新闻事件
  • 郑州艾特网站建设公司网络推广的方法和技巧
  • 深圳市政府网站建设 网站管理百度seo关键词报价
  • wordpress+vps建站模板建站多少钱
  • 开封网站建设流程与开发步骤百度网址大全官网旧版
  • 南昌市城乡建设委员会网站站长工具seo综合查询论坛
  • sofish wordpress主题长沙竞价优化
  • 网站二级导航制作谷歌官网首页
  • dede 网站源码宁波seo服务
  • photoshop做图网站品牌传播策划方案
  • 免费推广店铺的网站百度问一问人工客服怎么联系
  • 漳州市建设局网站6百度推广运营这个工作好做吗
  • 网站建设的步骤过程百度爱采购客服电话
  • 发布网站建设信息seo优化网站百度技术
  • 门户网站开发 项目实施方案百度网址大全 简单版