├── .editorconfig
├── flux-action-types.sublime-snippet
├── redux-create-reducer-util.sublime-snippet
├── react-stateless-component.sublime-snippet
├── react-createClass-class.sublime-snippet
├── react-es6-class.sublime-snippet
├── redux-action-creators.sublime-snippet
├── redux-createReducer.sublime-snippet
├── redux-switch-reducer.sublime-snippet
├── react-redux-container-component.sublime-snippet
├── webpack-config.sublime-snippet
├── react-createClass-class-with-lifelycle.sublime-snippet
├── react-es6-class-with-lifecycle.sublime-snippet
├── README.md
├── react-router-routes.sublime-snippet
├── react-radium-class.sublime-snippet
└── LICENSE
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = tab
5 | end_of_line = lf
6 | charset = utf-8
7 | trim_trailing_whitespace = true
8 | insert_final_newline = true
9 |
10 | [*.sublime-snippet]
11 | indent_style = space
12 | indent_size = 2
13 |
14 | [*.md]
15 | trim_trailing_whitespace = false
16 |
--------------------------------------------------------------------------------
/flux-action-types.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
11 | fat
12 | source.js
13 | flux action types
14 |
15 |
--------------------------------------------------------------------------------
/redux-create-reducer-util.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
14 | rdcru
15 | source.js
16 | redux createReducer util
17 |
18 |
--------------------------------------------------------------------------------
/react-stateless-component.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
7 | {children}
8 |
9 | ${1:ComponentName}.propTypes = {
10 | ${2:prop}: PropTypes.func.isRequired
11 | };
12 |
13 | ${1:ComponentName}.defaultProps = {};
14 |
15 |
16 | export default ${1:ComponentName};
17 |
18 | ]]>
19 | rslc
20 | source.js
21 | react stateless component
22 |
23 |
--------------------------------------------------------------------------------
/react-createClass-class.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | {this.props.children}
14 | );
15 | }
16 | });
17 |
18 |
19 | export default ${1:className};
20 |
21 | ]]>
22 | rcc
23 | source.js
24 | react createClass class
25 |
26 |
--------------------------------------------------------------------------------
/react-es6-class.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | {this.props.children}
14 | );
15 | }
16 | }
17 |
18 |
19 | export default ${1:className};
20 |
21 | ]]>
22 | r6c
23 | source.js
24 | react es6 class
25 |
26 |
--------------------------------------------------------------------------------
/redux-action-creators.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | {
17 | dispatch(${1:actionCreatorName}());
18 | }
19 | };
20 |
21 | ]]>
22 | rdac
23 | source.js
24 | redux action creators
25 |
26 |
--------------------------------------------------------------------------------
/redux-createReducer.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
20 | rdcr
21 | source.js
22 | redux createReducer
23 |
24 |
--------------------------------------------------------------------------------
/redux-switch-reducer.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
22 | rdsr
23 | source.js
24 | redux switch reducer
25 |
26 |
--------------------------------------------------------------------------------
/react-redux-container-component.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
27 | rrcc
28 | source.js
29 | react redux container component
30 |
31 |
--------------------------------------------------------------------------------
/webpack-config.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
21 | wpc
22 | source.js
23 | webpack.config.js
24 |
25 |
--------------------------------------------------------------------------------
/react-createClass-class-with-lifelycle.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | {this.props.children}
36 | );
37 | }
38 | });
39 |
40 |
41 | export default ${1:className};
42 |
43 | ]]>
44 | rccl
45 | source.js
46 | react createClass class with lifecycle
47 |
48 |
--------------------------------------------------------------------------------
/react-es6-class-with-lifecycle.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | {this.props.children}
39 | );
40 | }
41 | }
42 |
43 |
44 | export default ${1:className};
45 |
46 | ]]>
47 | r6cl
48 | source.js
49 | react es6 class with lifecycle
50 |
51 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Sublime React Snippet
2 |
3 | > A collection of React sublime snippets for personal usage.
4 |
5 | ## React
6 |
7 | - react createClass class: rcc
8 | - react createClass class with lifecycle: rccl
9 | - react es6 class: r6c
10 | - react es6 class with lifecycle: r6cl
11 | - react stateless component: rslc
12 |
13 | ## Flux
14 |
15 | #### Action
16 |
17 | - flux action types: fat
18 |
19 | ## React Router
20 |
21 | - react router routes: rrr
22 |
23 | ## Redux
24 |
25 | #### Component
26 |
27 | #### Action
28 |
29 | - redux action creators: rdac
30 |
31 | #### Reducer
32 |
33 | - redux create reducer util: rdcru
34 | - redux create reducer: rdcr
35 | - redux switch reducer: rdsr
36 |
37 | ## Radium
38 |
39 | - react radium class: rrc
40 |
41 | ## Webpack
42 |
43 | - webpack config: wpc
44 |
--------------------------------------------------------------------------------
/react-router-routes.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | );
24 |
25 | ]]>
26 | rrr
27 | source.js
28 | react router routes
29 |
30 |
--------------------------------------------------------------------------------
/react-radium-class.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
44 | {this.props.children}
45 | }
46 | );
47 | }
48 | }
49 |
50 |
51 | const styles = {
52 | base: {
53 |
54 | }
55 | };
56 |
57 |
58 | export default ${1:className};
59 | ]]>
60 | rrc
61 | source.js
62 | react radium class
63 |
64 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 C. T. Lin
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------