File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,7 @@ I.E. `tsrcc`
165165| `rxconst→` | `export const $1 = '$1 '` |
166166| `rxreducer→` | `redux reducer template` |
167167| `rxselect→` | `redux selector template` |
168+ | `rxslice→` | `redux slice template` |
168169
169170## PropTypes
170171
Original file line number Diff line number Diff line change 885885 " "
886886 ]
887887 },
888+ "reduxSlice" : {
889+ "prefix" : " rxslice" ,
890+ "body" : [
891+ " import { createSlice } from '@reduxjs/toolkit'" ,
892+ " " ,
893+ " const initialState = {" ,
894+ " " ,
895+ " }" ,
896+ " " ,
897+ " const ${1:${TM_FILENAME_BASE}} = createSlice({" ,
898+ " \t name: ${2:sliceName}," ,
899+ " \t initialState," ,
900+ " \t reducers: {" ,
901+ " \t " ,
902+ " \t }" ,
903+ " });" ,
904+ " " ,
905+ " export const {" ,
906+ " " ,
907+ " } = ${1:${TM_FILENAME_BASE}}.actions" ,
908+ " export default ${1:${TM_FILENAME_BASE}}.reducer"
909+ ]
910+ },
888911 "reactNativeComponent" : {
889912 "prefix" : " rnc" ,
890913 "body" : [
You can’t perform that action at this time.
0 commit comments