Directory

Docs: Interactivity API - Add @wordpress/interactivity as code requirement · Issue #61685 · WordPress/gutenberg · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Interactivity API - Add @wordpress/interactivity as code requirement #61685

Open
juanmaguitar opened this issue May 15, 2024 · 2 comments
Labels
[Feature] Interactivity API API to add frontend interactivity to blocks. Good First Issue An issue that's suitable for someone looking to contribute for the first time [Type] Developer Documentation Documentation for developers

Comments

@juanmaguitar
Copy link
Contributor

juanmaguitar commented May 15, 2024

As to create a store with the interactivity API we need to do something like...

import { store } from '@wordpress/interactivity';

I think we should add having the @wordpress/interactivity installed as a requirement at Reference Guides > Interactivity API Reference > Requirements of the Interactivity API > Code requirements

We could add another point to ensure this package is installed for the project

npm i @wordpress/interactivity -S
@juanmaguitar juanmaguitar added [Type] Developer Documentation Documentation for developers [Feature] Interactivity API API to add frontend interactivity to blocks. labels May 15, 2024
@colorful-tones
Copy link
Member

This is definitely a needed clarification. Good catch @juanmaguitar :shipit:

I have one nitpick, and I leave it to your discretion, but I prefer not to use shortened command-line flags because some folks who may be newer to npm might now know what the shortened flags are, and it is just easier to be explicit. So, maybe: npm install @wordpress/interactivity --save?

@juanmaguitar
Copy link
Contributor Author

So, maybe: npm install @wordpress/interactivity --save

Yes, I agree that would be much more clear 👍

@gziolo gziolo added the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Interactivity API API to add frontend interactivity to blocks. Good First Issue An issue that's suitable for someone looking to contribute for the first time [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

No branches or pull requests

3 participants