Can anybody describe clearly what the use of watchman available in npm library?
----Details I found---
npm - npm is the largest NodeJS package manager
NodeJS - Server-side Javascript runtime
Watchman - Simple utility that watches files/directories for changes and performs an action when they change(This is not clear for me/ what it deoes?/is there any example?)
React Native uses watchman to detect when you've made code changes and then automatically build and push the update to your device without you needing to manually refresh it.
https://facebook.github.io/watchman/ is the home page for the watchman used by React Native. Note that it is different and completely unrelated to https://www.npmjs.com/package/watchman which has some similar functionality.
The Facebook watchman service is designed to scale to very large filesystem trees and to aggregate watching resources across multiple projects. This allows us to re-use those system resources across React Native, Nuclide, Buck and Mercurial and keep them all running faster than they could without the aid of watchman.
You can read more about watchman in this blog post from when we released it: https://www.facebook.com/notes/facebook-engineering/watchman-faster-builds-with-large-source-trees/10151457195103920/