One of the best articles I've seen on writing documentation is "What Nobody Tells You About Documentation" [0]. It divides docs into four categories: Tutorials, How-To Guides, Discussions, and References.
I'm currently working on a major rewrite of the Redux core docs [1], and I've been taking notes on that post and various other docs writing resources [2] so I can apply them to the rewrite.
[0] https://www.divio.com/blog/documentation/