-자 is a connective ending used to indicate that two closely related actions in the past occurred in immediate succession, with the first serving as the cause, condition, or motivation for the second.
엄마가 곶감을 주자 아기는 바로 울음을 멈췄습니다.2 As soon as the mother gave the baby the dried persimmon, the baby stopped crying immediately.
-자 is a connective ending used to indicate that two closely related actions in the past occurred in immediate succession, with the first serving as the cause, condition, or motivation for the second.