Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@wordpress/interactivity
Advanced tools
Package that provides a standard and simple way to handle the frontend interactivity of Gutenberg blocks.
@wordpress/interactivity
The package @wordpress/interactivity
contains the logic that enables the Interactivity API which was introduced in WordPress Core in v6.5. This means this package is already bundled in Core in any version of WordPress higher than v6.5.
Install the Interactivity API using the command:
npm install @wordpress/interactivity --save
This step is only required if you use the Interactivity API outside WordPress.
Within WordPress, the package is already bundled in Core. To ensure it's loaded, add @wordpress/interactivity
to the dependency array of the script module. This process is often done automatically with tools like wp-scripts
.
Furthermore, this package assumes your code will run in an ES2015+ environment. If you're using an environment with limited or no support for such language features and APIs, you should include the polyfill shipped in @wordpress/babel-preset-default
in your code.
Interactivity API proposal, as part of Gutenberg and the WordPress project is free software, and is released under the terms of the GNU General Public License version 2 or (at your option) any later version. See LICENSE.md for complete license.
FAQs
Package that provides a standard and simple way to handle the frontend interactivity of Gutenberg blocks.
We found that @wordpress/interactivity demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.