Skip to content

Commit 884eded

Browse files
committed
Added react-redux container and reducer
1 parent 52fce12 commit 884eded

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

snippets/snippets.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,5 +253,15 @@
253253
"prefix": "ptshr",
254254
"body": "PropTypes.shape({\n\t$0\n}).isRequired,",
255255
"description": "An object taking on a particular shape required"
256+
},
257+
"reactReduxContainer": {
258+
"prefix": "rrcont",
259+
"body": "import { connect } from 'react-redux'\nimport { bindActionCreators } from 'redux'\n\nconst mapStateToProps = (state, ownProps) => ({})\n\nconst mapDispatchToProps = (dispatch, ownProps) => ({})\n\nexport default connect(mapStateToProps, mapDispatchToProps)",
260+
"description": "React-redux connect boilerplate"
261+
},
262+
"reduxReducer": {
263+
"refix": "reducer",
264+
"body": "import { actions } from '../constants'\n\nexport const initial = {}\n\nexport default function (state = initial, { type, payload }) {\n switch (type) {\n case actions.${0:ACTION_NAME}:\n default:\n return state\n }\n}",
265+
"description": "Reducer boilerplate"
256266
}
257267
}

0 commit comments

Comments
 (0)