It depends, if I implement a protocol / library I read the documentation and parts of the code.
If it's an app based on a framework like react I take code examples and face the problems as I move along. And maybe after the first 3 prototypes I read the complete documentation so it sticks because I have built the synapses to remember them better.