Skip to content

Block displaying data with withAPIData only if window width below 782px #6379

Description

@tinboyko

Issue Overview

You can follow this example from Gutenberg handbook.
After post edit page reload, block not displaying fetched data from API if window width bigger than 782px and get stuck in loading state. In safari if i go back to pages and open this page again data is appeared. I noticed that if window width > 782px edit method of wp.blocks.registerBlockType is called twice.

Steps to Reproduce (for bugs)

  1. Create block with HOC withAPIData (example)
  2. Add this block in editor
  3. Save post
  4. Reload page

Chrome, Firefox, Safari

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TestingNeeds further testing to be confirmed.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions