Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>shireee-react-utilsNew to Visual Studio Code? Get it now.
shireee-react-utils

shireee-react-utils

Shireee

|
9 installs
| (0) | Free
Utility for react developers.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Extension overview

Extension provide two features:

  1. Generate index.ts file
  2. Generate component folder template
  3. Snippets for react/ts/tanstack-query

Generate index.ts

This feature generate index.ts in same directoryt with export statement based on filename of activetab.

e.g: we are on MyComponent.tsx tab, and run feature. index.ts will be:

export { MyComponent } from './MyComponent';

ctrl+shift+\ - keybinding to generate index.ts

Generate component folder template

There are new option in explorer folder menu Generate component template:

alt text

Witch will generate follow stucture: alt text

Snippets

uss - useState snippet

const [|, set|] = useState<|>(|);

sfc - stateless functional component snippet

export const |: React.FC = () => {
   return <> |</>;
};

isfc - stateless functional component with interface snippet

interface |Props {}

export const |: React.FC<|Props>= () => {
    return <> | </>;
};

handle - handler snippet

const handle| = (|) => {
    /*statement*/
}

icex - index component export

export { | } from '.|';

iaex - index all export

"export * from '.|';

funm - Tanstack useMutate hook snippet

import { useMutation } from '@tanstack/react-query';

export function use|() {
    return useMutation({
        mutationKey: [|],
        mutationFn: (|) => {
           /*statement*/
        },
        onSuccess: () => {
            queryClient.invalidateQueries({ queryKey: [|] });
        },
    });
}

funq - Tanstack useQuery hook snippet

import { useQuery } from '@tanstack/react-query';

export function useAction(|) {
  return useQuery({
    queryKey: [|],
    queryFn: () => {
      /*statement*/
    },
  });
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft