Skip to content

Commit

Permalink
Update RRF usage doc
Browse files Browse the repository at this point in the history
  • Loading branch information
nosir committed Jul 8, 2018
1 parent ad234bc commit 2cadf9c
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions doc/reactjs-component-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,27 +366,7 @@ Or, you could also use the normalize abstraction at `Field` level, check the dis

Create an adapter with cleave.js:

```js
import Cleave from 'cleave.js/react';

const renderCleaveField = field => (
<Cleave {...field.input} options={{creditCard: true}} />
)
```

Render it into the normal `redux-form` `Field`

```js
<form onSubmit={...}>
<Field name="creditCard" component={renderCleaveField} />
<Field name="email" component="input" type="email" />
<button type="submit">Submit</button>
</form>
```

Then it just works.

Or, you could also use the normalize abstraction at `Field` level, check the discussion [here](https://github.com/nosir/cleave.js/issues/159#issuecomment-326487309)
[here](https://github.com/nosir/cleave.js/issues/335#issuecomment-402936738)

## References

Expand Down

0 comments on commit 2cadf9c

Please sign in to comment.