fake-react
v1.1.0
Published
Fake types for react flow autocomplete in non-react environments
Downloads
4
Readme
fake-react
Fake react class for jsx flow autocomplete in non-react environments.
// @flow
import {Component} from 'fake-react'
// Component - really empty class but with React.Component definition
type AProps = {
a: number;
}
type AState = {}
class A extends Component<AProps, AState> {
constructor(props: Props, state: State) {
super()
}
render() {}
}
<A a="12"/> // flow generate type error
<A a={123}/> // no errors