DEV Community

Cover image for Cool VSCode Extensions that that I've discovered
Mitchell Mutandah
Mitchell Mutandah

Posted on • Updated on

Cool VSCode Extensions that that I've discovered

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

Top comments (16)

Collapse
 
kiranmantha profile image
Kiran Mantha

I like json to code

Collapse
 
mitchiemt11 profile image
Mitchell Mutandah

One of my favourites! : )

Collapse
 
ryne_ profile image
Himanshu Agarwal

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.

Collapse
 
mitchiemt11 profile image
Mitchell Mutandah

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,”

Collapse
 
nenyasha profile image
Melody Mbewe

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

Collapse
 
mitchiemt11 profile image
Mitchell Mutandah

Thanks, Melody!

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

Collapse
 
mohit1607 profile image
mohit1607

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

Collapse
 
mitchiemt11 profile image
Mitchell Mutandah

It's a pleasure!

Collapse
 
alexanderwalsh profile image
Alexander Walsh

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

Collapse
 
mitchiemt11 profile image
Mitchell Mutandah

Trust me, you will enjoy it! 😎

Collapse
 
bodynar profile image
Artem

Please, include links to extensions into the article

Collapse
 
mitchiemt11 profile image
Mitchell Mutandah

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

Collapse
 
frulow profile image
Frulow

More like React vscode extensions

Collapse
 
vivekvag profile image
Vivek Gupta

that's cool

Collapse
 
danieloor profile image
Daniel Oor

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

Collapse
 
benjaminv profile image
benjaminv

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