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

Fix: Direct import fails in block editor #67081

Closed
wants to merge 1 commit into from

Conversation

haritpanchal
Copy link

@haritpanchal haritpanchal commented Nov 18, 2024

What?

import { BoxControl } from '@wordpress/components';

Getting react minified error while following the above way.

Why?

import { __experimentalBoxControl as BoxControl } from '@wordpress/components';

This is the correct way but information is missing in document. This solved the minify error.

How?

Testing Instructions

  1. Add the BoxControl demo in your block as shows in current documentation
  2. Access your block in editor.
  3. Block will fail to load and console will show error. (Error: Minified React error Add delete button #130)

Testing Instructions for Keyboard

Screenshots or screencast

Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: haritpanchal <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Nov 18, 2024
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @haritpanchal! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@Mamaduka Mamaduka added the [Type] Developer Documentation Documentation for developers label Nov 19, 2024
@Mamaduka
Copy link
Member

The BoxControl component is stable now, so the import in the documentation is correct. If you see errors, please update the WP to the latest version.

Ref: #65469.

@Mamaduka Mamaduka closed this Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants