I like to comment on new features, new libraries and new frameworks.
That is why I want to give more context how I come to my conclusions.
The less dependencies the better
At the start of a project or a new feature the functionalities are identified and then those are matched with the possibilities of the language.
When the functionalities are out of scope for the language. The functionalities are matched with libraries, standalone or framework dependent.
If enough functionalities have a framework match, the framework dependencies get priority.
Don't use dependencies with the same functionality
I see a lot of libraries that bring with them functionality that is already present in the code base by another library or custom code. For me that is a reason not to use it.
When I talk about the same functionality I'm not talking about helper libraries like a test library, but about the core functionality of a library.
Dependencies should be composable.
Can it be custom code
There are people that believe adding dependencies is better because it saves the project from maintaining the edge cases and security risks. While it is certainly a factor in the decision process, it should not become a dogma.
With AI code generation the statement of the dependency gets us 90% there is becoming blurry. The main reason is because that 10% could bring with it as much development time as a 100% AI generated solution.
The maintenance is still a factor, even with AI generated code. My experience is that the 10% code is not documented most of the time, and that is why people are hesitant to change working code.
With custom code this could be documented from day one.
Conclusion
Deciding to use a dependency should be a well throughout process to make the best decision in the long run.
You should see it as adding salt to food. If there is too little, it is possible to add more. Once you added too much, it is harder to dilute the taste.