Skip to content
This repository was archived by the owner on Jan 3, 2025. It is now read-only.

Commit 434eb89

Browse files
authored
Removed the underscore in the starting of the prefix (#62)
* Removed the underscore in the starting of the prefix for type friendly prefix * Update README.md * Update README.md * Update snippet * Added prefix 'im' for empty import instead of just 'i'
1 parent 72bd072 commit 434eb89

File tree

2 files changed

+153
-152
lines changed

2 files changed

+153
-152
lines changed

Diff for: README.md

+73-73
Original file line numberDiff line numberDiff line change
@@ -28,84 +28,84 @@ The **⇥** means the `TAB` key
2828

2929
| Trigger | Content |
3030
| -------: | ------- |
31-
| `_i` | import empty |
32-
| `_ir` | import react |
33-
| `_irc` | import react and component |
34-
| `_irp` | import react and prop-types |
35-
| `_ipt` | import prop-types |
36-
| `_ircp` | import react, component and prop-types |
37-
| `_ird` | import react-dom |
38-
| `_irs` | import react and useState |
39-
| `_ire` | import react and useEffect |
40-
| `_irse` | import react, useState and useEffect |
41-
| `_ex` | export |
42-
| `_exd` | export default |
43-
| `_cdm` | `componentDidMount method` |
44-
| `_cwm` | `componentWillMount method` |
45-
| `_cwr` | `componentWillReceiveProps method` |
46-
| `_scu` | `shouldComponentUpdate method` |
47-
| `_cwup` | `componentWillUpdate method` |
48-
| `_cdup` | `componentDidUpdate method` |
49-
| `_cwun` | `componentWillUnmount method` |
50-
| `_cdc` | `componentDidCatch method` |
51-
| `_cx` | `cx` |
52-
| `_fup` | `forceUpdate` |
53-
| `_cct` | component contextTypes |
54-
| `_cpt` | component propTypes |
55-
| `_cdp` | component defaultProps |
56-
| `_scct` | static component contextTypes |
57-
| `_scpt` | static component propTypes |
58-
| `_scdp` | static component defaultProps |
59-
| `_cer` | class component skeleton |
60-
| `_rsc` | stateless component skeleton |
61-
| `_rscp` | stateless component skeleton with PropTypes |
62-
| `_rscr` | stateless component skeleton with explicit `return` |
63-
| `_rscc` | stateless component skeleton with `handleClick` |
64-
| `_rsf` | stateless function |
65-
| `_cdn` | component display name |
66-
| `_ren` | `render() method` |
67-
| `_sst` | `setState()` |
68-
| `_ust` | use state `const [x, setX] = useState()` |
69-
| `_props` | `this.props.` |
70-
| `_state` | `this.state.` |
71-
| `_rrc` | `React.render()` |
72-
| `_frag` | `<React.Fragment></React.Fragment>` |
73-
| `_cns` | `constructor method` |
74-
| `_clss` | class extends |
75-
| `_dnghtml` | `dangerouslySetInnerHTML` |
31+
| `i` | import empty |
32+
| `ir` | import react |
33+
| `irc` | import react and component |
34+
| `irp` | import react and prop-types |
35+
| `ipt` | import prop-types |
36+
| `ircp` | import react, component and prop-types |
37+
| `ird` | import react-dom |
38+
| `irs` | import react and useState |
39+
| `ire` | import react and useEffect |
40+
| `irse` | import react, useState and useEffect |
41+
| `ex` | export |
42+
| `exd` | export default |
43+
| `cdm` | `componentDidMount method` |
44+
| `cwm` | `componentWillMount method` |
45+
| `cwr` | `componentWillReceiveProps method` |
46+
| `scu` | `shouldComponentUpdate method` |
47+
| `cwup` | `componentWillUpdate method` |
48+
| `cdup` | `componentDidUpdate method` |
49+
| `cwun` | `componentWillUnmount method` |
50+
| `cdc` | `componentDidCatch method` |
51+
| `cx` | `cx` |
52+
| `fup` | `forceUpdate` |
53+
| `cct` | component contextTypes |
54+
| `cpt` | component propTypes |
55+
| `cdp` | component defaultProps |
56+
| `scct` | static component contextTypes |
57+
| `scpt` | static component propTypes |
58+
| `scdp` | static component defaultProps |
59+
| `cer` | class component skeleton |
60+
| `rsc` | stateless component skeleton |
61+
| `rscp` | stateless component skeleton with PropTypes |
62+
| `rscr` | stateless component skeleton with explicit `return` |
63+
| `rscc` | stateless component skeleton with `handleClick` |
64+
| `rsf` | stateless function |
65+
| `cdn` | component display name |
66+
| `ren` | `render() method` |
67+
| `sst` | `setState()` |
68+
| `ust` | use state `const [x, setX] = useState()` |
69+
| `props` | `this.props.` |
70+
| `state` | `this.state.` |
71+
| `rrc` | `React.render()` |
72+
| `frag` | `<React.Fragment></React.Fragment>` |
73+
| `cns` | `constructor method` |
74+
| `clss` | class extends |
75+
| `dnghtml` | `dangerouslySetInnerHTML` |
7676

7777
In this version the PropTypes snippets prefix has changed to `_pt` instead of `rp`. All snippets have two versions to allow for required and not required types.
7878

7979
| Trigger | Content |
8080
| -------: | ------- |
81-
| `_pta` | `PropTypes.array,` |
82-
| `_ptar` | `PropTypes.array.isRequired,` |
83-
| `_ptb` | `PropTypes.bool,` |
84-
| `_ptbr` | `PropTypes.bool.isRequired,` |
85-
| `_ptf` | `PropTypes.func,` |
86-
| `_ptfr` | `PropTypes.func.isRequired,` |
87-
| `_ptn` | `PropTypes.number,` |
88-
| `_ptnr` | `PropTypes.number.isRequired,` |
89-
| `_pto` | `PropTypes.object.,` |
90-
| `_ptor` | `PropTypes.object.isRequired,` |
91-
| `_pts` | `PropTypes.string,` |
92-
| `_ptsr` | `PropTypes.string.isRequired,` |
93-
| `_ptnd` | `PropTypes.node,` |
94-
| `_ptndr` | `PropTypes.node.isRequired,` |
95-
| `_ptel` | `PropTypes.element,` |
96-
| `_ptelr` | `PropTypes.element.isRequired,` |
97-
| `_pti` | `PropTypes.instanceOf(ClassName),` |
98-
| `_ptir` | `PropTypes.instanceOf(ClassName).isRequired,` |
99-
| `_pte` | `PropTypes.oneOf(['News', 'Photos']),` |
100-
| `_pter` | `PropTypes.oneOf(['News', 'Photos']).isRequired,` |
101-
| `_ptet` | `PropTypes.oneOfType([PropTypes.string, PropTypes.number]),` |
102-
| `_ptetr` | `PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,` |
103-
| `_ptao` | `PropTypes.arrayOf(PropTypes.number),` |
104-
| `_ptaor` | `PropTypes.arrayOf(PropTypes.number).isRequired,` |
105-
| `_ptoo` | `PropTypes.objectOf(PropTypes.number),` |
106-
| `_ptoor` | `PropTypes.objectOf(PropTypes.number).isRequired,` |
107-
| `_ptsh` | `PropTypes.shape({color: PropTypes.string, fontSize: PropTypes.number}),` |
108-
| `_ptshr` | `PropTypes.shape({color: PropTypes.string, fontSize: PropTypes.number}).isRequired,` |
81+
| `pta` | `PropTypes.array,` |
82+
| `ptar` | `PropTypes.array.isRequired,` |
83+
| `ptb` | `PropTypes.bool,` |
84+
| `ptbr` | `PropTypes.bool.isRequired,` |
85+
| `ptf` | `PropTypes.func,` |
86+
| `ptfr` | `PropTypes.func.isRequired,` |
87+
| `ptn` | `PropTypes.number,` |
88+
| `ptnr` | `PropTypes.number.isRequired,` |
89+
| `pto` | `PropTypes.object.,` |
90+
| `ptor` | `PropTypes.object.isRequired,` |
91+
| `pts` | `PropTypes.string,` |
92+
| `ptsr` | `PropTypes.string.isRequired,` |
93+
| `ptnd` | `PropTypes.node,` |
94+
| `ptndr` | `PropTypes.node.isRequired,` |
95+
| `ptel` | `PropTypes.element,` |
96+
| `ptelr` | `PropTypes.element.isRequired,` |
97+
| `pti` | `PropTypes.instanceOf(ClassName),` |
98+
| `ptir` | `PropTypes.instanceOf(ClassName).isRequired,` |
99+
| `pte` | `PropTypes.oneOf(['News', 'Photos']),` |
100+
| `pter` | `PropTypes.oneOf(['News', 'Photos']).isRequired,` |
101+
| `ptet` | `PropTypes.oneOfType([PropTypes.string, PropTypes.number]),` |
102+
| `ptetr` | `PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,` |
103+
| `ptao` | `PropTypes.arrayOf(PropTypes.number),` |
104+
| `ptaor` | `PropTypes.arrayOf(PropTypes.number).isRequired,` |
105+
| `ptoo` | `PropTypes.objectOf(PropTypes.number),` |
106+
| `ptoor` | `PropTypes.objectOf(PropTypes.number).isRequired,` |
107+
| `ptsh` | `PropTypes.shape({color: PropTypes.string, fontSize: PropTypes.number}),` |
108+
| `ptshr` | `PropTypes.shape({color: PropTypes.string, fontSize: PropTypes.number}).isRequired,` |
109109

110110
Contributing
111111
------------

0 commit comments

Comments
 (0)