It's not really comparable. Duolingo is a nice game and all, but if you want to get serious about language learning (having a vocabulary > 10000 words) Anki + example sentences is the way to go.
I suppose it depends on why you’re learning a thing. If you’re seriously trying to learn a language then using a variety of tools that cover different aspects of language learning is vital.
For me and Duo (Spanish) I’m on a 438 day streak and I couldn’t talk to someone but I could read enough to get by, but I am not learning Spanish to learn Spanish. I know that sounds ridiculous, but learning new things for me is more about the journey and having fun along the way, without having any pressure of this is my end goal. I just like learning different things and often just move on as my curiosity changes.
That’s not to say that I don’t learn some things with an end goal, as an example I’m a junior software developer so I had to be more structured with that.
However, this requires significantly larger amount of work compared to said learning apps, which has establisged learning course in form of easily digestable chunk.
You need to digest textbook and such on your own into small chunks, then Anki cards. It's essentially building course by yourself.
Fluent Forever from Gabriel Wymer gives some idea on how to utilize Anki, though the author moved to build his own closed source app.