Skip to content

Commit

Permalink
Add breaking change to migration docs
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwooding committed Apr 18, 2019
1 parent 893ba76 commit 269a194
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/src/pages/guides/migration-v3/migration-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,3 +340,22 @@ You should be able to move the custom styles to the root class key.
`event.preventDefault()` is meant to stop default behaviors like clicking a checkbox to check it, hitting a button to submit a form, and hitting left arrow to move the cursor in a text input etc.
Only special HTML elements have these default behaviors.
People should use `event.stopPropagation()` if they don't want to trigger a `onClose` event on the modal.

### Slide

- [Slide] Convert to function component (#15344) @joshwooding

The child of the `Slide` needs to be able to hold a ref.

```diff
class Component extends React.Component {
render() {
return <div />
}
}
-const MyComponent = props => <div {...props} />
+const MyComponent = React.forwardRef((props, ref) => <div ref={ref} {...props} />);
<Slide><Component /></Slide>
<Slide><MyComponent /></Slide>
<Slide><div /></Slide>
```

0 comments on commit 269a194

Please sign in to comment.