I'm a .net developer with exposure to nuget package manager console only. I was reading about nodejs and reactjs; where both require npm & yarn packet managers.
Can any one explain the difference between these products? And why are they introduced?
npm is the Node Package Manager. Basically it is used to install dependencies. In your case you will need this for React.
Yarn package manager is also used for to install dependencies i.e to install Javascript packages.
The difference between npm and yarn is:
Takes 10-12sec to install packages.
Yarn installs all dependencies parallel.
Does not always require an internet connection to install dependencies.
Takes 20-25sec to install packages.
NPM always installs each dependency one after the other which may end up taking a lot of time.
Installing dependencies always requires an internet connection.