How can I configure Watchman to reduce the number of files it watches in a React Native project?

Question

Grade: Education Subject: Support
How can I configure Watchman to reduce the number of files it watches in a React Native project?
Asked by:
96 Viewed 96 Answers

Answer (96)

Best Answer
(417)
You can try excluding directories from Watchman's monitoring. Use the `watchman watch-del-all` command followed by `watchman watch` with specific paths to include. Alternatively, you can use the `.watchmanconfig` file to define exclusions. For example, you might exclude `node_modules` or build directories. Experiment with different exclusion patterns to find a balance between responsiveness and resource usage.