1.1.0 • Published 8 years ago

fake-react v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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
1.1.0

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago