Skip to content

Commit 269a194

Browse files
committed
Add breaking change to migration docs
1 parent 893ba76 commit 269a194

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/src/pages/guides/migration-v3/migration-v3.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,3 +340,22 @@ You should be able to move the custom styles to the root class key.
340340
`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.
341341
Only special HTML elements have these default behaviors.
342342
People should use `event.stopPropagation()` if they don't want to trigger a `onClose` event on the modal.
343+
344+
### Slide
345+
346+
- [Slide] Convert to function component (#15344) @joshwooding
347+
348+
The child of the `Slide` needs to be able to hold a ref.
349+
350+
```diff
351+
class Component extends React.Component {
352+
render() {
353+
return <div />
354+
}
355+
}
356+
-const MyComponent = props => <div {...props} />
357+
+const MyComponent = React.forwardRef((props, ref) => <div ref={ref} {...props} />);
358+
<Slide><Component /></Slide>
359+
<Slide><MyComponent /></Slide>
360+
<Slide><div /></Slide>
361+
```

0 commit comments

Comments
 (0)