How to avoid tendonitis in future?

Prevention. Big topic! tendonitis is frequently the result of overuse injuries so training modification is important. Resolve any imbalances such as malalignment (orthotics), weakness and tightness (physical therapist) or technique(coach). Cross train so that you are not doing the same things over and over. Something simple like checking the grip on your racket or shaft of the golf club may help as well.