I am using react hooks. I using a global context with reducer. Instead of writing each case of reducer function inside function. I want to separate in in the files. Example of my file is below
export type SetDrawingDataAction = {"set-drawing-data": Data};
export function setDrawingData(state : IGlobalState, data: number) : IGlobalState{
}
In the above file you can that I am using the name SetDrawingData at three places but with different formats.
Currently my snippet looks like below but its not making setDrawingDataAction capital.
"Generate Action file": {
"prefix": "actd",
"body": [
"export type ${1/(.*)/${1:/capitalize}/} = {\"\": Data}",
"export function $1(state : IGlobalState, data: Data) : IGlobalState {",
" $2",
"}"
],
"description": "Generate action file witn data"
}
Kindly answer how can I change formats by using only single inputs. The first one is to capitalize the can second need is to change camelCase to camel-case
