withAPIData doesn't fetch after page reload #6537
Labels
REST API Interaction
Related to REST API
[Type] Bug
An existing feature does not function as intended
Milestone
Hey guys, thanks for the awesome work around Gutenberg. I want to report the following issue that another guy reproduced already.
Issue Overview
When withAPIData is used, the data is loaded only when the block is added freshly to Gutenberg. If the block was already added and someone reloads the whole page, there is no data.
Steps to Reproduce (for bugs)
props.categoriesList.data
exists and has data.props.categoriesList.data
isundefined
.I used Firefox developer edition 60.0b16 (64-Bit). But could reproduce it with Chrome 66.0.3359.139 as well.
Expected Behavior
In the example above,
props.categoriesList
should return{get: ƒ, isLoading: false, path: "/wp/v2/posts?per_page=4", create: ƒ, isCreating: false, data: [array data]}
Current Behavior
In the example above,
props.categoriesList
returns{get: ƒ, isLoading: true, path: "/wp/v2/posts?per_page=4", create: ƒ, isCreating: false]}
(no data)Possible Solution
That's the question.
The text was updated successfully, but these errors were encountered: