combine으로는 stream 으로 관리를 해야한다. 하지만 가끔 property처럼 가지고가고 싶은 경우가 있을 수 있다.
예를 들면 다음과 같다. var property: Int = 0 var stream: CurrentValueSubject
(물론 sideeffect 는 negiligible 하다) 이럴경우 편법? 은 아니고 유명한 방법이 있는다. property Wrapper 로 감싸면 되는데, Rx는 예시가 많지만 Combine은 예시가 없어서 붙여본다. // BaseProperty import Foundation import Combine class BaseProperty: Subject { typealias Input = T typealias Output = T typealias Failure =...