Skip to content

Commit

Permalink
removed react snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
David Chen committed Nov 3, 2021
1 parent dac2fcf commit 5295fab
Showing 1 changed file with 0 additions and 48 deletions.
48 changes: 0 additions & 48 deletions Ultisnips/javascript.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -401,54 +401,6 @@ snippet rs "React useState"
const [$1, set${1}] = useState(${0:''})
endsnippet

snippet us.e "useEffect" w
useEffect(() => {
$1
})${0:;}
endsnippet

snippet us.er "useEffect with return" w
useEffect(() => {
$1
return () => {
$2
};
})${0:;}
endsnippet

snippet us.c "useContext" w
const $1 = useContext($2)${0:;}
endsnippet

snippet us.r "useReducer" w
const [$1, dispatch] = useReducer($1Reducer, ${2:${VISUAL:initialState}})
const $1Reducer = (state, action) => {
switch (action.type) {
default:
return state;
}
}${0:;}
endsnippet

snippet us.cb "useCallback" w
useCallback(
() => {
$1
},
[$2],
)${0:;}
endsnippet

snippet us.m "useMemo" w
const $1 = useMemo(() => {
$2
}, [$3])${0:;}
endsnippet

snippet us.rf "useRef" w
const $1 = useRef($2)${0:;}
endsnippet

snippet test "Test"
test("${1:test}", ${2:async}() => {
${3:// ...}
Expand Down

0 comments on commit 5295fab

Please sign in to comment.