mobx
mobx Basices
observable
class CounterState {
@observable
number = 0
}computed
class MarketStore {
@observable
selectedItems = []
@computed
get totalPrice() {
// 총합 계산
return this.selectedItems.reduce((previous, { price }) => {
return previous + price
}, 0)
}
}action
mobx-react Basices
observer
inject
typescript props type error 해결방법
Last updated