Skip to content

a VS-Code Extension that provides snippets for Typescript, React, GraphQL, Jest and @testing-library/react

License

Notifications You must be signed in to change notification settings

thomb89/typescript-react-snippets

Repository files navigation

typescript-react-snippets README

This Snippet Pack contain a collection of snippets to work with various npm-packages for react, redux and testing-library

Redux:

Tests

React

Features

###snippet commands:

Test

  • describe (jest describe shortcut)
  • it (jest it shortcut)

Redux

  • redux-configurestore (boilerplate to create the RootState + RootReducer)
  • redux-create-slice (boilerplate to create a State + Reducer slice)
  • redux-create-reducer (add actions to redux-create-slice)
  • redux-create-async-thunk (create an async thunk)
  • redux-create-api (add an RTK Query reducer)
  • redux-api-endpoint (add an RTK Query or Mutation endpoint)
  • useDispatch (add useDispatch to React.FC)
  • useSelector (add useSelector to React.FC)
  • useStore (add useStore to React.FC)

React

  • rfc (React.FC skeleton)
  • useState (add useState to React.FC)
  • useCallback (add useCallback to React.FC)
  • useEffect (add useEffect to React.FC)
  • useMemo (add useMemo to React.FC)
  • useRef (add useRef to React.FC)
  • useForm (add useForm from react-hook-form to React.FC + handleSubmit function)

About

a VS-Code Extension that provides snippets for Typescript, React, GraphQL, Jest and @testing-library/react

Resources

License

Stars

Watchers

Forks