JavaScript for WordPress Forums Gutenberg Development isSelected and InspectorControls

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #46245

    I am watching the “04.07 – Example – Inspector Controls” and when the <InspectorControls> is used in the edit it is used with isSelected

    isSelected && <InspectorControls>

    Now I can’t seem to find this isSelected && … pattern used on the core blocks.

    Can I skip the isSelected? It does seem to work without it.

    Zac Gordon

    That is correct! isSelected is no longer needed for toolbars or inspector controls 🙂

    I will add some notes to the course pages about this next week. Great catch!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.