For me, it was an e-book [0] that I wanted to write to teach others about React. The idea was to learn React while building an application that is more complex than a Todo Application.
So I took the first 3 months to write the initial draft - only 90 pages. I released it on Leanpub as an unfinished book, because it was painfully hard to keep going. Yet the community seemed to like it. It confirmed me being on the right track and my motivation went up again.
Since then I iterated 4 times to improve and enrich the learning experience and "released" it multiple times. I keep it updated to the recent library versions, best practices and new techniques with the help of the open source community. Now it has over 170 pages and over 11.000 downloads.
What helped in my case: Release early and improve/iterate based on the feedback.