Check out example codes for "directions api remove points bubble". It will help you in understanding the concepts better.

Code Example 1

directionsDisplay.setMap(map);
directionsDisplay.setOptions( { suppressMarkers: true } );

Learn ReactJs, React Native from akashmittal.com