📌
My Docs
React
React
  • General Notes
    • index
    • Review-Of-Previous-Concepts
    • Reiew
    • Spread and Rest
    • Understanding By Example
    • React-Resources
    • Using Web Components in React
    • Thinking in React
    • Hello World
    • REACT ENVIORMENT
    • Components And Props
    • Composition vs Inheritance
    • JSX
    • Advanced
    • Project Examples
    • Node.js versus Next.js - A React Approach
    • Composition vs Inheritance
    • React Components
    • Docs
    • Prerequisites
      • Callbacks
      • Scope
      • Mutability
      • Array-CB-Methods
      • Objects
      • Glossary
    • index
    • Question Set #1:
    • Website
    • Editor Setup
    • Quick Start
    • JavaScript in JSX with Curly Braces
    • Your First Component
    • Reducer
    • Passing Data Deeply with Context
    • Manipulating the DOM with Refs
    • Rendering Lists
    • Choosing the State Structure
    • Tips
  • Udemy React & Redux
    • JSX
    • Modern+React+With+Redux
    • Examples
  • Articles
    • Introduction to React for Complete Beginners
    • A Comprehensive Deep Dive into React
    • Super Simple Intro To React
    • Basic React Tutorial
  • REACT DOCS
    • Shallow Compare
    • Performance Tools
    • Keyed Fragments
    • Test Utilities
    • Code-Splitting
    • Introducing Concurrent Mode (Experimental)
    • Components and Props
    • Concurrent Mode API Reference (Experimental)
    • Conditional Rendering
    • Suspense for Data Fetching (Experimental)
    • Cross-origin Errors
    • Error Decoder
    • Error Boundaries
    • New React App
    • Passing Functions to Components
    • recommended way to structure React projects?
    • Forms
    • Fragments
    • Getting Started
    • Versioning Policy
    • Add-Ons
    • Rules of Hooks
    • Using the State Hook
    • How to Contribute
    • Introducing JSX
    • JSX In Depth
    • Event Pooling
    • Portals
    • Optimizing Performance
    • React Without ES6
    • SyntheticEvent
    • PureRenderMixin
    • ReactDOMServer
    • Profiler API
    • Test Renderer
    • Refs and the DOM
    • Static Type Checking
    • State and Lifecycle
    • Uncontrolled Components
    • Web Components
    • PureRenderMixin
Powered by GitBook
On this page
  • Your editor
  • Recommended text editor features
  • Formatting on save

Was this helpful?

  1. General Notes

Editor Setup

PreviousWebsiteNextQuick Start

Last updated 3 years ago

Was this helpful?

A properly configured editor can make code clearer to read and faster to write. It can even help you catch bugs as your write them! If this is your first time setting up an editor or you’re looking to tune up your current editor, we have a few recommendations.

Your editor

is one of the most popular editors in use today. It has a large marketplace of extensions and integrates well with popular services like GitHub. Most of the features listed below can be added to VS Code as extensions as well, making it highly configurable!

Other popular text editors used in the React community include:

  • —an integrated development environment designed specifically for JavaScript.

  • —has support for JSX and TypeScript, syntax highlighting and autocomplete built in.

  • —a highly configurable text editor built to make creating and changing any kind of text very efficient. It is included as “vi” with most UNIX systems and with Apple OS X.

Recommended text editor features

Some editors come with these features built in, but others might require adding an extension. Check to see what support your editor of choice provides to be sure!

Code linters find problems in your code as you write, helping you fix them early. is a popular, open source linter for JavaScript.

The last thing you want to do when sharing your code with another contributor is get into an discussion about ! Fortunately, will clean up your code by reformatting it to conform to preset, configurable rules. Run Prettier, and all your tabs will be converted to spaces—and your indentation, quotes, etc will also all be changed to conform to the configuration. In the ideal setup, Prettier will run when you save your file, quickly making these edits for you.

You can install the by following these steps:

  1. Launch VS Code

  2. Use Quick Open (press CTRL/CMD + P)

  3. Paste in ext install esbenp.prettier-vscode

  4. Press enter

Formatting on save

Ideally, you should format your code on every save. VS Code has settings for this!

  1. In VS Code, press CTRL/CMD + SHIFT + P.

  2. Type “settings”

  3. Hit enter

  4. In the search bar, type “format on save”

  5. Be sure the “format on save” option is ticked!

Prettier can sometimes conflict with other linters. But there’s usually a way to get them to run nicely together. For instance, if you’re using Prettier with ESLint, you can use eslint-prettier plugin to run prettier as an ESLint rule.

https://beta.reactjs.org/learn/editor-setup
VS Code
WebStorm
Sublime Text
Vim
ESLint
tabs vs spaces
Prettier
Prettier extension in VSCode