Meta tags:
description= Create React App comes with a bunch of tools that improve the editing experience - if configured correctly. Here s a few tips to maximize your productivity:;
Headings (most frequently used words):
editor, the, in, code, setting, up, your, syntax, highlighting, displaying, lint, output, debugging, formatting, automatically, extending, or, replacing, default, eslint, config, visual, studio, webstorm,
Text of the page (most frequently used words):
the (49), you (23), and (22), your (20), code (18), editor (14), prettier (12), react (11), lint (11), app (11), for (9), with (9), #eslint (8), config (8), this (8), staged (8), that (8), webstorm (7), json (7), debugging (6), page (6), files (6), can (6), copy (6), debug (6), start (6), create (6), only (6), rules (6), github (5), visual (5), studio (5), make (5), project (5), write (5), scripts (5), see (5), are (5), npm (5), need (5), note (5), set (5), typescript (5), automatically (4), output (4), will (4), format (4), run (4), src (4), add (4), husky (4), javascript (4), support (4), url (4), have (4), rule (4), extending (3), syntax (3), highlighting (3), next (3), new (3), integration (3), now (3), commit (3), css (3), field (3), package (3), few (3), more (3), they (3), may (3), install (3), style (3), then (3), chrome (3), development (3), has (3), been (3), base (3), higher (3), learn (2), started (2), docs (2), formatting (2), replacing (2), default (2), displaying (2), developing (2), components (2), isolation (2), edit (2), want (2), favorite (2), read (2), section (2), whenever (2), also (2), jsx (2), tsx (2), scss (2), dependencies (2), example (2), following (2), sure (2), file (2), correctly (2), root (2), formatter (2), git (2), about (2), use (2), yarn (2), save (2), our (2), running (2), click (2), green (2), icon (2), different (2), made (2), adjustments (2), via (2), host (2), port (2), environment (2), variables (2), select (2), http (2), localhost (2), 3000 (2), configurations (2), extension (2), installed (2), please (2), changes (2), newly (2), all (2), from (2), webroot (2), launch (2), version (2), below (2), out (2), box (2), enables (2), most (2), minimal (2), tools (2), feature (2), warn (2), additional (2), overrides (2), shared (2), building (2), provide (2), should (2), find (2), affect (2), terminal (2), browser (2), right (2), some (2), editors (2), text (2), works (2), here (2), setting (2), copyright, 2025, facebook, inc, social, contributor, covenant, twitter, discussions, stack, overflow, community, get, updating, releases, previous, last, updated, daniel, rentz, 2022, might, integrate, changed, entire, first, time, node_modules, bin, pre, hooks, every, formatted, adding, lines, before, commits, allows, blog, post, makes, possible, githooks, alternatively, opinionated, ensure, within, information, look, action, same, way, application, intellij, idea, ultimate, phpstorm, pycharm, pro, rubymine, press, macos, windows, linux, menu, paste, into, configuration, jetbrains, ide, having, problems, their, troubleshooting, guide, pressing, clicking, breakpoints, modified, webpack, sourcemappathoverrides, workspacefolder, request, type, name, block, put, inside, folder, directory, vscode, latest, developer, without, leaving, importantly, continuous, workflow, where, context, switching, don, switch, between, currently, supported, extends, eslintconfig, targets, applies, extended, important, any, stop, error, when, working, object, target, highly, recommend, removing, could, introduce, hard, issues, there, things, remember, extend, replace, completely, enforce, coding, consider, using, instead, even, customise, these, won, because, intentionally, provides, common, mistakes, not, required, linting, linter, well, console, prefer, results, appear, plugin, including, sublime, atom, plugins, created, projects, available, configure, head, follow, instructions, popular, covered, relevant, babel, documentation, comes, bunch, improve, editing, experience, configured, tips, maximize, productivity, advanced, usage, deployment, back, end, testing, styles, assets, https, analyzing, bundle, size, setup, getting, welcome, search, help, deprecated, skip, main, content,
Text of the page (random words):
setting up your editor create react app skip to main content create react app is deprecated read more here create react app docs help github search k welcome getting started development editor setup developing components in isolation analyzing bundle size https in development styles and assets building your app testing back end integration deployment advanced usage support on this page setting up your editor create react app comes with a bunch of tools that improve the editing experience if configured correctly here s a few tips to maximize your productivity syntax highlighting to configure the syntax highlighting in your favorite text editor head to the relevant babel documentation page and follow the instructions some of the most popular editors are covered displaying lint output in the editor note this feature is available with react scripts 0 2 0 and higher it works out of the box for newly created projects with react scripts 2 0 3 and higher it also only works with npm 3 or higher some editors including sublime text atom and visual studio code provide plugins for eslint they are not required for linting you should see the linter output right in your terminal as well as the browser console if you prefer the lint results to appear right in your editor please make sure you install an eslint plugin extension note that even if you customise your eslint config these changes will only affect the editor integration they won t affect the terminal and in browser lint output this is because create react app intentionally provides a minimal set of rules that find common mistakes if you want to enforce a coding style for your project consider using prettier instead of eslint style rules extending or replacing the default eslint config you can extend our base eslint config or replace it completely if you need there are a few things to remember we highly recommend extending the base config as removing it could introduce hard to find issues when working with typescript you ll need to provide an overrides object for rules that should only target typescript files it s important to note that any rules that are set to error will stop the project from building in the below example the base config has been extended by a shared eslint config a new rule has been set that applies to all javascript and typescript files and a new rule has been set that only targets typescript files eslintconfig extends react app shared config rules additional rule warn overrides files ts x rules additional typescript only rule warn copy debugging in the editor this feature is currently only supported by visual studio code and webstorm visual studio code and webstorm support debugging out of the box with create react app this enables you as a developer to write and debug your react code without leaving the editor and most importantly it enables you to have a continuous development workflow where context switching is minimal as you don t have to switch between tools visual studio code you need to have the latest version of vs code installed then add the block below to your launch json file and put it inside the vscode folder in your app s root directory version 0 2 0 configurations name chrome type chrome request launch url http localhost 3000 webroot workspacefolder src sourcemappathoverrides webpack src webroot copy note the url may be different if you ve made adjustments via the host or port environment variables start your app by running npm start and start debugging in vs code by pressing f5 or by clicking the green debug icon you can now write code set breakpoints make changes to the code and debug your newly modified code all from your editor having problems with vs code debugging please see their troubleshooting guide webstorm you need to have webstorm and jetbrains ide support chrome extension installed in the webstorm menu run select edit configurations then click and select javascript debug paste http localhost 3000 into the url field and save the configuration note the url may be different if you ve made adjustments via the host or port environment variables start your app by running npm start then press d on macos or f9 on windows and linux or click the green debug icon to start debugging in webstorm the same way you can debug your application in intellij idea ultimate phpstorm pycharm pro and rubymine formatting code automatically prettier is an opinionated code formatter with support for javascript css and json with prettier you can format the code you write automatically to ensure a code style within your project see prettier s github page for more information and look at this page to see it in action to format our code whenever we make a commit in git we need to install the following dependencies npm install save husky lint staged prettier copy alternatively you may use yarn yarn add husky lint staged prettier copy husky makes it possible to use githooks as if they are npm scripts lint staged allows us to run scripts on staged files in git see this blog post about lint staged to learn more about it prettier is the javascript formatter we will run before commits now we can make sure every file is formatted correctly by adding a few lines to the package json in the project root add the following field to the package json section husky hooks pre commit lint staged copy next we add a lint staged field to the package json for example dependencies lint staged src js jsx ts tsx json css scss md prettier write scripts copy now whenever you make a commit prettier will format the changed files automatically you can also run node_modules bin prettier write src js jsx ts tsx json css scss md to format your entire project for the first time next you might want to integrate prettier in your favorite editor read the section on editor integration on the prettier github page edit this page last updated on 6 29 2022 by daniel rentz previous updating to new releases next developing components in isolation syntax highlighting displaying lint output in the editor extending or replacing the default eslint config debugging in the editor visual studio code webstorm formatting code automatically docs get started learn react community stack overflow github discussions twitter contributor covenant social github copyright 2025 facebook inc
|