인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

인프런 커뮤니티 질문&답변

이룸님의 프로필 이미지
이룸

작성한 질문수

Redux vs MobX (둘 다 배우자!)

computed와 MobX@6

observable말고 useLocalObservable안에 있는 함수도 자동으로 action적용이 될까요?

작성

·

325

0

안녕하세요. 제로초님!

항상 좋은 강의 열심히 듣고 있습니다!

혹시 observable안에 있는 함수가 자동으로 action 적용이 된다고 말씀주셨는데요! 그럼 useLocalObservable도 안에 있는함수도 자동으로 action이 적용 되는건가요?

답변 2

1

제로초(조현영)님의 프로필 이미지
제로초(조현영)
지식공유자

네 됩니다.

When using useLocalObservable, all properties of the returned object will be made observable automatically, getters will be turned into computed properties, and methods will be bound to the store and apply mobx transactions automatically. If new class instances are returned from the initializer, they will be kept as is.

0

이룸님의 프로필 이미지
이룸
질문자

답변 감사드립니다!

이룸님의 프로필 이미지
이룸

작성한 질문수

질문하기