mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-22 20:01:57 +00:00
Forgotten import statement for createElement (#5601)
Added `createElement` in the import statement since it was used within the code snippet but was not imported.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user