react version in wordpress 6.4
- User
react version in wordpress 6.4
Assistant
WordPress 6.4 does not include React as a core dependency by default. However, WordPress does use React in certain parts of the admin interface, such as the Block Editor (Gutenberg).
React Version in WordPress 6.4 (Gutenberg)
As of WordPress 6.4, the Gutenberg plugin (which powers the Block Editor) uses React 18.2.0.
How to Check the React Version in WordPress
-
Inspect the Gutenberg Editor:
- Open the WordPress admin dashboard.
- Go to the Block Editor (e.g., edit a post or page).
- Open the browser's developer tools (
F12orCtrl+Shift+I). - In the Console tab, run:
console.log(React.version); - This should display the React version being used.
-
Check the Gutenberg Plugin Source:
- The Gutenberg plugin (which is merged into WordPress core) includes React in its dependencies.
- You can find the version in the
package.jsonof the Gutenberg plugin:"dependencies": { "react": "^18.2.0", "react-dom": "^18.2.0" }
Important Notes:
- WordPress core does not bundle React for general use in themes or plugins.
- If you're developing a custom block or plugin that uses React, you should include React as a dependency in your project (e.g., via
@wordpress/scriptsorwp-element). - The
@wordpress/scriptspackage (used for WordPress block development) also uses React 18.
Would you like guidance on using React in a WordPress plugin or theme?
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.