Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added info on using global variables. #976

Merged
merged 5 commits into from
Nov 20, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed typo.
  • Loading branch information
jhorneman committed Oct 28, 2016
commit 3cb549738163bff4d961e3f626b2b8a1c729086b
2 changes: 1 addition & 1 deletion packages/react-scripts/template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ Create React App will add decorator support when the specification advances to a

## Using Global Variables defined elsewhere

When you include a script in the HTML file that defines global variables, and you then try to use one of these variables in code managed by Create React Aapp, ESLint will complain because it cannot see the definition of the variable.
When you include a script in the HTML file that defines global variables, and you then try to use one of these variables in code managed by Create React App, ESLint will complain because it cannot see the definition of the variable.

You can avoid this by reading the global variable explicitly from the window object, e.g.:

Expand Down