Repository URL to install this package:
|
Version:
3.0.2 ▾
|
// /**
// * @example using updateForProps
// */
// interface EhProps {
// maxValue?: number
// }
//
// import { observable, action } from 'xmobx/mobx'
// class State {
// @observable maxValue: number = 0
//
// @action setMaxValue(maxValue: number) {
// this.maxValue = maxValue
// }
//
// @action update(values: EhProps) {
// Object.keys(values).forEach(key => {
// this[key] = values[key]
// })
// }
// }
//
// import * as React from 'react'
// import { observerWithObservableProps } from './deps.updateForProps'
//
// @observerWithObservableProps
// class Eh extends React.Component<EhProps> {
// observableState = new State()
//
// updateState(value: EhProps) {
// console.log('props changed o.o')
// this.observableState.update(value)
// }
// }
describe('observer with observable props', () => {
it.skip('should have a full support', () => {
// todo
})
})