Is it necessary to give a baby medicine for acid reflux?

Gabriela • First time mom. 23. Due 06.26.17

My LO has acid reflux n the doctor recommended Ranitidine. But althought I have tried it for a bit, im very hesitant to continue. I feel as though he is too little (2 month old) to be taking medicine. He is gaining excellent weight and he isnt crying much. The reason they recommended was bec he was spitting up yellow (not often), n he arches his back n is a little fussy while eating. I am exclusively breastfeeding. My questions is: Is it necessary to medicate? Could he be in pain bec of the acid reflux? What other route could I take to help him with the reflux? Thanks!