[Tex/LaTex] How to have titlesec-like behaviour in KOMA-Script

koma-scriptsectioningtitlesec

I am using \documentclass{scrartcl} which I believe is a KOMA-Script type.

I now wish to have each \section{} start in a new page, similar to what \usepackage{titlesec} offers, as shown on this question.

How can I do so?

Currently, I get this warning which is why I asked this question:

Class scrartcl Warning: Usage of package `titlesec' together
(scrartcl) with a KOMA-Script class is not recommended. 
(scrartcl) I'd suggest to use the package only 
(scrartcl) if you really need it, because it breaks several
(scrartcl) KOMA-Script features, i.e., option `headings' and
(scrartcl) the extended optional argument of the section
(scrartcl) commands .
(scrartcl) Nevertheless, using requested
(scrartcl) package `titlesec' on input line 7.

Best Answer

Add a \clearpage to each section:

\documentclass{scrartcl}
\addtokomafont{section}{\clearpage}
\begin{document}

\section{foo}foo
\section{bar}bar
\subsection{foooo} foooo
\section{baz}baz
\section{foobar}foobar

\end{document}