Repository URL to install this package:
|
Version:
3.4.2 ▾
|
import { ObserverInputProps } from './typings'
export function fromPropsToInputState(props: ObserverInputProps) {
if (process.env.NODE_ENV === 'production') {
return props.state
} else {
if (!props.state) {
throw new Error('must pass `state` to <ObserverInput>')
} else {
return props.state
}
}
}