Closed pesterev closed 6 years ago
It's already support React Component.
If you write a stateful component, the code is look like this
class Test extends React.Component<Props> {
Stateless component with enhance Function can be written like this
import { type HOC, compose, lifecycle, mapProps, pure } from 'recompose'
import React from 'react'
type Common = {
className?: string,
}
type Enhanced = {
a: boolean,
b: boolean,
show: boolean,
} & Common
type Props = {} & Common
const enhance: HOC<Props, Enhanced> = compose(
lifecycle({}),
mapProps(({ ...rest }) => ({ ...rest })),
pure,
)
export const Test = ({ className }: Props) => (
<div className={className}>
<span />
</div>
)
export default enhance(Test)
Type checking work normally like other packages.
To make autocomplete, you need to type at least 3 characters to active hint tooltip. (Custom Minimum word length on autocomplete-plus core package)
Shall we close this? 😄
Yes, now the current version supports jsx. Thnx
Is it planned to support JSX React.js projects and how can i help?