ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
<!--DOC_START--> ## 常用 ### `rcls` ```js import React, { Component } from 'react'; import PropTypes from 'prop-types'; class $COMPONENT$ extends Component { render() { return ( <div>$END$</div> ); } } $COMPONENT$.propTypes = {}; $COMPONENT$.defaultProps = {}; export default $COMPONENT$; ``` ### `rpfc` ```js import React from 'react'; import PropTypes from 'prop-types'; function $COMPONENT$($PARAMETER$) { return ( <div>$END$</div> ); } $COMPONENT$.propTypes = {}; $COMPONENT$.defaultProps = {}; export default $COMPONENT$; ``` ### `rpfcaf` ```js import React from 'react'; import PropTypes from 'prop-types'; const $COMPONENT$ = ($PARAMETER$) => { return ( <div>$END$</div> ); }; $COMPONENT$.propTypes = {}; $COMPONENT$.defaultProps = {}; export default $COMPONENT$; ``` ### `rcc` ```js import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; const $COMPONENT$ = createReactClass({ render() { return ( <div>$END$</div> ); } }); export default $COMPONENT$; ``` ### `cdm` ```js componentDidMount() { $END$ } ``` ### `cdu` ```js componentDidUpdate(prevProps, prevState, prevContext) { $END$ } ``` ### `cwm` ```js componentWillMount() { $END$ } ``` ### `cwr` ```js componentWillReceiveProps(nextProps, nextContext) { $END$ } ``` ### `cwu` ```js componentWillUpdate(nextProps, nextState, nextContext) { $END$ } ``` ### `cwum` ```js componentWillUnmount() { $END$ } ``` ### `gdp` ```js getDefaultProps() { return { $END$ }; } ``` ### `gis` ```js getInitialState() { return { $START$: $END$ }; } ``` ## 参考 ### `rdom` ```js import ReactDOM from 'react-dom'; $END$ ``` ### `rccc` ```js $START$ = createReactClass({ render() { return ( $END$ ); } }); ``` ### `dn` ```js displayName: '$END$', ``` ### `dnp` ```js $START$.displayName = '$END$'; ``` ### `fdn` ```js findDOMNode($END$); ``` ### `rfdn` ```js ReactDOM.findDOMNode($END$); ``` ### `fup` ```js forceUpdate($END$); ``` ``` ### `ism` ```js isMounted() ``` ### `props` ```js this.props ``` ### `dsih` ```js dangerouslySetInnerHTML={{__html: '$END$'}} ``` ### `pts` ```js propTypes: { $START$: PropTypes.$END$, }, ``` ### `pt` ```js $START$: PropTypes.$END$, ``` ### `refs` ```js this.refs.$END$ ``` ### `ren` ```js render() { return ( <div>$END$</div> ); } ``` ### `scu` ```js shouldComponentUpdate(nextProps, nextState, nextContext) { $END$ } ``` ### `sst` ```js this.setState({ $START$: $END$, }); ``` ### `state` ```js this.state.$END$ ``` ### `ct` ```js contextTypes: { $START$: PropTypes.$END$, }, ``` ### `cct` ```js childContextTypes: { $START$: PropTypes.$END$, }, ``` ### `ctx` ```js this.context.$END$ ``` ### `gcc` ```js getChildContext() { return { $START$: $END$ }; } ``` ``` ### `sdn` ```js static displayName = '$END$'; ``` ### `spt` ```js static propTypes = { $START$: PropTypes.$END$, }; ``` ### `sdp` ```js static defaultProps = { $START$: $END$, }; ``` ### `sct` ```js static contextTypes = { $START$: PropTypes.$END$, }; ``` ### `scct` ```js static childContextTypes = { $START$: PropTypes.$END$, }; ``` ### `cstt` ```js constructor(props, context$START$) { super(props, context$END$); } ``` ### `tsn` ```js transitionName="$END$" ``` ### `tsa` ```js transitionAppear={$END$} ``` ### `tse` ```js transitionEnter={$END$} ``` ### `tsl` ```js transitionLeave={$END$} ``` ### `tset` ```js transitionEnterTimeout={$END$} ``` ### `tslt` ```js transitionLeaveTimeout={$END$} ``` ### `tsat` ```js transitionAppearTimeout={$END$} ``` ### `oncp` ```js onCopy={$END$} ``` ### `onct` ```js onCut={$END$} ``` ### `onpt` ```js onPaste={$END$} ``` ### `oncpse` ```js onCompositionEnd={$END$} ``` ### `oncpss` ```js onCompositionStart={$END$} ``` ### `oncpsu` ```js onCompositionUpdate={$END$} ``` ### `onkd` ```js onKeyDown={$END$} ``` ### `onps` ```js onKeyPress={$END$} ``` ### `onku` ```js onKeyUp={$END$} ``` ### `onfs` ```js onFocus={$END$} ``` ### `onbl` ```js onBlur={$END$} ``` ### `oncg` ```js onChange={$END$} ``` ### `onip` ```js onInput={$END$} ``` ### `onsb` ```js onSubmit={$END$} ``` ### `onc` ```js onClick={$END$} ``` ### `oncm` ```js onContextMenu={$END$} ``` ### `ondc` ```js onDoubleClick={$END$} ``` ### `ondg` ```js onDrag={$END$} ``` ### `ondge` ```js onDragEnd={$END$} ``` ### `ondgetr` ```js onDragEnter={$END$} ``` ### `ondget` ```js onDragExit={$END$} ``` ### `ondgl` ```js onDragLeave={$END$} ``` ### `ondgo` ```js onDragOver={$END$} ``` ### `ondgst` ```js onDragStart={$END$} ``` ### `ondp` ```js onDrop={$END$} ``` ### `onmd` ```js onMouseDown={$END$} ``` ### `onme` ```js onMouseEnter={$END$} ``` ### `onml` ```js onMouseLeave={$END$} ``` ### `onmm` ```js onMouseMove={$END$} ``` ### `onmot` ```js onMouseOut={$END$} ``` ### `onmov` ```js onMouseOver={$END$} ``` ### `onmu` ```js onMouseUp={$END$} ``` ### `onsl` ```js onSelect={$END$} ``` ### `ontc` ```js onTouchCancel={$END$} ``` ### `onte` ```js onTouchEnd={$END$} ``` ### `ontm` ```js onTouchMove={$END$} ``` ### `onts` ```js onTouchStart={$END$} ``` ### `onsl` ```js onScroll={$END$} ``` ### `onwl` ```js onWheel={$END$} ``` ### `onabt` ```js onAbort={$END$} ``` ### `oncpl` ```js onCanPlay={$END$} ``` ### `oncpt` ```js onCanPlayThrough={$END$} ``` ### `ondc` ```js onDurationChange={$END$} ``` ### `onempt` ```js onEmptied={$END$} ``` ### `onekpt` ```js onEncrypted={$END$} ``` ### `onend` ```js onEnded={$END$} ``` ### `onldd` ```js onLoadedData={$END$} ``` ### `onldmd` ```js onLoadedMetadata={$END$} ``` ### `onls` ```js onLoadStart={$END$} ``` ### `onpaus` ```js onPause={$END$} ``` ### `opl` ```js onPlay={$END$} ``` ### `onplg` ```js onPlaying={$END$} ``` ### `onpgs` ```js onProgress={$END$} ``` ### `onrc` ```js onRateChange={$END$} ``` ### `onsked` ```js onSeeked={$END$} ``` ### `onskin` ```js onSeeking={$END$} ``` ### `onstd` ```js onStalled={$END$} ``` ### `onsupd` ```js onSuspend={$END$} ``` ### `ontu` ```js onTimeUpdate={$END$} ``` ### `onvc` ```js onVolumeChange={$END$} ``` ### `onwt` ```js onWaiting={$END$} ``` ### `onld` ```js onLoad={$END$} ``` ### `onerr` ```js onError={$END$} ``` ### `onas` ```js onAnimationStart={$END$} ``` ### `onae` ```js onAnimationEnd={$END$} ``` ### `onai` ```js onAnimationIteration={$END$} ``` ### `ontse` ```js onTransitionEnd={$END$} ``` <!--DOC_END-->