Skip to content

Commit

Permalink
Updating 1.x migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
atomicpages committed Sep 15, 2020
1 parent 19d5c27 commit 50c3e97
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/docs/migration/migratig-1.x.md
Expand Up @@ -42,6 +42,27 @@ function App() {
}
```

## `inputProps`

The `inputProps` prop has been removed in favor of a _flat_ structure. For example:

## `inputProps`

The `inputProps` prop has been removed in favor of a _flat_ structure. For example:

```diff
function App() {
const onFocus = React.useCallback(() => { ... }, []);

return (
<Checkbox
- inputProps={{ onFocus }}
+ onFocus={onFocus}
>Testing</Checkbox>
);
}
```

## Render Prop

Render prop (a.k.a child render function) has been removed from PCR 3.x. In practice the render prop approach was error-prone and often lead to error conditions and frustration. If you really require customization of the `.state` div, open an issue on github.

0 comments on commit 50c3e97

Please sign in to comment.