Sukka
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
beta/src/content/apis/react/cloneElement.md
@ -29,7 +29,7 @@ const clonedElement = cloneElement(element, props, ...children)
To override the props of some < CodeStep step = {1} > React element</ CodeStep > , pass it to `cloneElement` with the < CodeStep step = {2} > props you want to override</ CodeStep > :
```js [[1, 5, "< Row title = \\"Cabbage \\" /> "], [2, 6, "{ isHighlighted: true }"], [3, 4, "clonedElement"]]
import { cloned Element } from 'react';
import { cloneElement } from 'react';
// ...
const clonedElement = cloneElement(
@ -650,7 +650,7 @@ This approach is particularly useful if you want to reuse this logic between dif
Call `cloneElement` to create a React element based on the `element` , but with different `props` and `children` :
```js
import { cloned Element } from 'react';
import { cloneElement } from 'react';
// ...
const clonedElement = cloneElement(