Framework vs Library: Library provides set of functions and we call them when we need them, here our code is in charge. Framework on other hand provides an environment and being in charge of our code, it runs our code when it requires.
Libraries are supplemental piece of functionality. They help you solve specific problem but don’t dictate overall architecture of the app. They avoid conflicts with other libraries and let you selectively use their feature as you set fit. Example are lodash, jQuery or RxJS. For instance RxJS works well with all of those.
Frameworks are big and prescriptive. You might chose one framework to start application. You might supplement that with several libraries to help with separate problems. The most common ones are Angular, Vue and React. Each comes with much of a scaffolding for typical application. However it’s also easy to use libraries with them