Browse Source

Forgotten import statement for `createElement` (#5601)

Added `createElement` in the import statement since it was used within the code snippet but was not imported.
main
Mark Evola 2 years ago
committed by GitHub
parent
commit
8e3674608f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      beta/src/content/reference/react/isValidElement.md

2
beta/src/content/reference/react/isValidElement.md

@ -23,7 +23,7 @@ const isElement = isValidElement(value)
Call `isValidElement(value)` to check whether `value` is a React element.
```js
import { isValidElement } from 'react';
import { isValidElement, createElement } from 'react';
// ✅ React elements
console.log(isValidElement(<p />)); // true

Loading…
Cancel
Save