# Does auto.arima of the forecast package deal with seasonality and trend automatically

I'm reading some code involving auto.arima method from the forecast package in R. What I'm curious is whether there is a necessity for decomposing the time series data into seasonal, trend and stochastic compoents before passing to the auto.arima method, or is it automatically handled by the functionality of the method?

Yes, the aim of auto.arima is for fitting ARIMA models automatically. You do not need to decompose your time series before hand. See how the algorithm works here https://otexts.com/fpp3/arima-r.html.
You may still want to look at arguments available in the auto.arima function, and you may want to change default maximum values for p, q, and d, etc.