Cool VSCode Extensions that that I've discovered
Mitchell Mutandah

Mitchell Mutandah @iammtander

About: Full stack Developer

Location:
Cape Town, SA
Joined:
Dec 2, 2021

Cool VSCode Extensions that that I've discovered

Publish Date: Jun 12 '24
198 16

Recently, I revisited a React side project that I had abandoned last year. In doing so, I discovered some essential VSCode extensions that have significantly enhanced my productivity as a React developer. The only rule for this list is that all these extensions are React specific. While they might be useful for other purposes, their main focus is React.

So, let's dive in.

Let's go


These extensions will help by providing you with snippets. Snippets are predefined pieces of code that can expand into a complete code block with a single keystroke (pressing the tab key in most cases). These snippets can range from a single line to an entire file. By using snippets, you can condense whole files into a short abbreviation, making your coding experience much smoother.

1. ES7 React/Redux/GraphQL/React-Native Snippets

ES7

This extension provides a comprehensive collection of snippets for React, Redux, GraphQL, and React Native. These snippets can significantly speed up your development process by allowing you to quickly generate commonly used code structures. For example:

  • rcc creates a React class component skeleton.
  • rfc generates a React functional component.
  • rnfce snippets help you quickly set up React Native component with default export.
  • The list is endless . Explore here

These snippets are highly customizable and cover a wide range of use cases, making your development more efficient.

2. React Hooks Snippets

hooks

The React Hooks snippet extension simplifies the addition of hooks in React by providing specific abbreviations:

  • ush for useState initializes a state variable.
  • ueh for useEffect sets up a side effect.
  • uch for useContext accesses a context.

This extension is particularly useful because it focuses on React's hooks API, which is a core feature for functional components. It helps you quickly implement hooks without having to remember the exact syntax every time.

3. VSCode React Refactor

refactor

VSCode React Refactor allows you to refactor your code by extracting parts of it into separate components. This can be particularly useful when your component becomes too large and you want to break it down into smaller, more manageable pieces. For example:

  • Select a piece of JSX code.
  • Right-click and choose "Refactor".
  • Extract it into a new component.

This extension supports TypeScript and ensures that your extracted components are correctly imported and used, streamlining your refactoring process.

4. Paste JSON as Code

json

Paste JSON as Code allows you to convert JSON objects into code. This is especially useful when dealing with APIs that return JSON responses. For instance:

  • Copy a JSON object.
  • Use the command palette to choose "Paste JSON as Code".
  • Convert the JSON into JavaScript or TypeScript code with type definitions.

This extension helps in quickly transforming JSON data into usable code structures, saving time and reducing errors.

5. SVG Gallery

svg

SVG Gallery is an excellent tool for managing SVG files in your projects. It allows you to preview SVG files directly in VSCode, which can be particularly handy when dealing with multiple SVG assets. Features include:

  • Preview SVGs within the editor.
  • Copy SVG content as React components.
  • Organize and manage your SVG assets efficiently.

This extension simplifies the process of working with SVG files, making it easier to integrate and manage vector graphics in your React projects.


While the above recommendations come from my subjective point of view and personal experience with these extensions, I urge you to install and experience them yourself. Each developer has unique needs and workflows, and these extensions might fit differently into your projects.

I encourage you to share some of the cool extensions that have enhanced your productivity. Remember, these are not the only extensions out there, and I'm always on the lookout for new tools to improve my workflow.

This brings us to a thought-provoking question: Are we creating lazy programmers by relying heavily on these extensions, or are we genuinely enhancing productivity and efficiency? Share your thoughts and experiences. Let’s discuss whether these tools are crutches or catalysts for better development.

Until next time!......

cheers

Comments 16 total

  • Melody Mbewe
    Melody MbeweJun 12, 2024

    Wow, that's some impressive digging there @mitchiemt11 Thank you for sharing!

    • Mitchell Mutandah
      Mitchell MutandahJun 13, 2024

      Thanks, Melody!

      I plan to share more now that I have many of these productivity extensions.

  • Kiran Mantha
    Kiran ManthaJun 13, 2024

    I like json to code

  • benjaminv
    benjaminvJun 13, 2024

    I’m missing a few of them. Thanks for sharing.

  • Artem
    ArtemJun 13, 2024

    Please, include links to extensions into the article

    • Mitchell Mutandah
      Mitchell MutandahJun 14, 2024

      Thanks for the reminder, Artem. Recheck now, I have embedded the link to install each extension.

  • Alexander Walsh
    Alexander WalshJun 13, 2024

    Wow, I'm new to React and I'm glad this will be very helpful to me. Thanks for sharing 😊

  • Himanshu Agarwal
    Himanshu AgarwalJun 13, 2024

    I also read another post vscode extension post but this one regarding security:

    scmagazine.com/news/vscode-extensi...

    A lot of them even top rated ones contain malicious code so use with precautions and do a self check.

    • Mitchell Mutandah
      Mitchell MutandahJun 14, 2024

      Thanks for sharing, Himanshu. I think Microsoft should do something about that. I strongly support this note from researchers:

      “Dear Microsoft, You created an amazing product, one used and adored by millions of developers, but those developers put their trust in you to design a safe product. I can only hope that the security design flaws mentioned in this blog post will be fixed in the coming months,”

  • Frulow
    FrulowJun 14, 2024

    More like React vscode extensions

  • mohit1607
    mohit1607Jun 14, 2024

    Really thank you, You saved my lot of time by recommending these things, React refractor is the ultimately hepful extension I have found.

  • Daniel Oor
    Daniel OorJun 16, 2024

    Half of these extensenions have not been updated sine 2021...
    Please update your article accordingly!

  • Vivek Gupta
    Vivek GuptaJun 18, 2024

    that's cool

Add comment