You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Developing Components in Isolation](#developing-components-in-isolation)
52
53
-[Making a Progressive Web App](#making-a-progressive-web-app)
53
54
-[Deployment](#deployment)
@@ -480,7 +481,7 @@ Now you are ready to use the imported React Bootstrap components within your com
480
481
481
482
Flow is a static type checker that helps you write code with fewer bugs. Check out this [introduction to using static types in JavaScript](https://medium.com/@preethikasireddy/why-use-static-types-in-javascript-part-1-8382da1e0adb) if you are new to this concept.
482
483
483
-
Recent versions of [Flow](http://flowtype.org/) work with Create React App projects out of the box.
484
+
Recent versions of [Flow](http://flowtype.org/) work with Create React App projects out of the box.
484
485
485
486
To add Flow to a Create React App project, follow these steps:
486
487
@@ -938,10 +939,18 @@ This feature is experimental and still [has major usage issues](https://github.c
938
939
939
940
### Editor Integration
940
941
941
-
If you use [Visual Studio Code](https://code.visualstudio.com), there is a [Jest extension](https://github.com/orta/vscode-jest) which works with Create React App out of the box. This provides a lot of IDE-like features while using a text editor: showing the status of a test run with potential fail messages inline, starting and stopping the watcher automatically, and offering one-click snapshot updates.
942
+
If you use [Visual Studio Code](https://code.visualstudio.com), there is a [Jest extension](https://github.com/orta/vscode-jest) which works with Create React App out of the box. This provides a lot of IDE-like features while using a text editor: showing the status of a test run with potential fail messages inline, starting and stopping the watcher automatically, and offering one-click snapshot updates.
942
943
943
944

944
945
946
+
### Debugging
947
+
948
+
You can easily debug your tests by passing the usual debug flags to `npm test`.
949
+
950
+
For example:
951
+
- Run `npm test -- --debug-brk` to attach the the debugger using your debugger of choice (vscode, webstorm, etc).
952
+
- Run `npm test -- debug` to enter the CLI debugger.
953
+
945
954
## Developing Components in Isolation
946
955
947
956
Usually, in an app, you have a lot of UI components, and each of them has many different states.
@@ -1173,16 +1182,16 @@ GitHub Pages doesn't support routers that use the HTML5 `pushState` history API
1173
1182
### Heroku
1174
1183
1175
1184
Use the [Heroku Buildpack for Create React App](https://github.com/mars/create-react-app-buildpack).<br>
1176
-
You can find instructions in [Deploying React with Zero Configuration](https://blog.heroku.com/deploying-react-with-zero-configuration).
1185
+
You can find instructions in [Deploying React with Zero Configuration](https://blog.heroku.com/deploying-react-with-zero-configuration).
1177
1186
1178
1187
#### Resolving "Module not found: Error: Cannot resolve 'file' or 'directory'"
1179
1188
1180
1189
Sometimes `npm run build` works locally but fails during deploy via Heroku with an error like this:
1181
1190
1182
-
```
1191
+
```
1183
1192
remote: Failed to create a production build. Reason:
1184
-
remote: Module not found: Error: Cannot resolve 'file' or 'directory'
1185
-
MyDirectory in /tmp/build_1234/src
1193
+
remote: Module not found: Error: Cannot resolve 'file' or 'directory'
1194
+
MyDirectory in /tmp/build_1234/src
1186
1195
```
1187
1196
1188
1197
This means you need to ensure that the lettercase of the file or directory you `import` matches the one you see on your filesystem or on GitHub.
0 commit comments