Documentation is one of the most important resource a developer can have. When a new technology, framework or library is designed, the developers make a documentation explaining how to use that technology.
When I started learning React I never really read the documentation. I always watched tutorials, which is good. But I later realized I missed quit a number of lessons I would have learnt if I had also reported to the official react documentation. Recently I developed a project and used an npm package ( react-intersection-observation) for detecting the presence of a component in the view port. I came across this package in a youtube tutorial which did exactly what I wanted and I never saw the importance in reading the documentation. During the project, I wanted to trigger the detection once but I couldn't. I did a try and error using useState and useEffect here and there but to no avail. I finally decided to check the documentation only to find out there was a triggerOnce property that would do what I wanted. I had already wasted the time and I could never retrieve it.
HOW TO LEARN FROM DOCUMENTATION
Whichever way you prefer to learn a new technology, whether by watching tutorials, reading a book or having someone teach you always take time to go through the official documentation. Take an example like learning React, after learning react hooks by watching tutorial or otherwise, refer to the section o the official documentation about hooks. Take time and go through, chances are you'll find something new or get a clearer explanation on something you didn't quite get which will save you hours of debugging.
I would like to conclude with this qoute.
10 hours of debugging can save you 1 hour of reading documentation- Anonymous
- Sounds funny but I have experienced this many times. It's still not a habit to me but though conscious effort I know it'll become an habit. Also try visiting official documentation when you receive unusual error and chances are you'll find the solution hidden there.
- Please don't forget to buy me a coffee, Mathias Martey. Follow me on twitter @blaq_xcobar