How to use “getEntityRecords” for user data?
Question
How can I use getEntityRecords
for user data?
I have read these two posts, and it seems like that an endpoint for user is not included as the default entry for getEntityRecords
in Gutenberg’s source code.
Is it possible to get user data through REST API to Gutenberg?
I have tried with this code, but it return an empty array
wp.data.select("core").getEntityRecords('user', 'user')
Gutenberg source code: https://github.com/WordPress/gutenberg/blob/e4b5330e61b61b64b7f3354b6a9d9a8c395a9aa9/packages/core-data/src/entities.js#L14
0
block-editor
3 years
2020-04-05T12:50:59-05:00
2020-04-05T12:50:59-05:00 0 Answers
120 views
0
Leave an answer