File tree Expand file tree Collapse file tree 4 files changed +62
-0
lines changed Expand file tree Collapse file tree 4 files changed +62
-0
lines changed Original file line number Diff line number Diff line change
1
+ # -*- mode : snippet -*-
2
+ # contributor : Seong Yong-ju
3
+ # name : action
4
+ # key : action
5
+ # --
6
+ const ${ 1 :$ (upcase (s-snake-case yas-text)) } = '${ 1 :$ (upcase (s-snake-case yas-text)) } ';
7
+
8
+ export const ${ 1 :actionName } = (${ 2 :args } ) => ({
9
+ type: '${ 1 :$ (upcase (s-snake-case yas-text)) } ',
10
+ payload: {
11
+ $0
12
+ },
13
+ });
Original file line number Diff line number Diff line change
1
+ # -*- mode : snippet -*-
2
+ # contributor : Seong Yong-ju
3
+ # name : Redux container
4
+ # key : container
5
+ # --
6
+ import { connect } from 'react-redux';
7
+
8
+ const mapStateToProps = (state, ownProps) => ({
9
+ $0
10
+ });
11
+
12
+ const mapDispatchToProps = (dispatch, ownProps) => ({
13
+
14
+ });
15
+
16
+ const ${ 1 :`(f-base buffer-file-name) ` } = connect(
17
+ mapStateToProps,
18
+ mapDispatchToProps
19
+ )(${ 2 :Component } );
20
+
21
+ export default $1 ;
Original file line number Diff line number Diff line change
1
+ # -*- mode : snippet -*-
2
+ # contributor : Seong Yong-ju
3
+ # name : mergeProps
4
+ # key : mergeProps
5
+ # --
6
+ const mergeProps = (stateProps, dispatchProps, ownProps) => ({
7
+ ...stateProps,
8
+ ...dispatchProps,
9
+ ...ownProps,
10
+ $0
11
+ });
Original file line number Diff line number Diff line change
1
+ # -*- mode : snippet -*-
2
+ # contributor : Seong Yong-ju
3
+ # name : reducer
4
+ # key : reducer
5
+ # --
6
+ const initialState = {
7
+ $1
8
+ };
9
+
10
+ export default (state = initialState, action) => {
11
+ switch (action.type) {
12
+ $0
13
+
14
+ default:
15
+ return state;
16
+ }
17
+ };
You can’t perform that action at this time.
0 commit comments