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

Leverage getEntityRecord when getting taxonomies from core-data #6780

Closed
danielbachhuber opened this issue May 16, 2018 · 0 comments · Fixed by #6939
Closed

Leverage getEntityRecord when getting taxonomies from core-data #6780

danielbachhuber opened this issue May 16, 2018 · 0 comments · Fixed by #6939
Labels
[Type] Enhancement A suggestion for improvement.

Comments

@danielbachhuber
Copy link
Member

danielbachhuber commented May 16, 2018

Re: taxonomies function in core-data/reducer.js:

Instead of adding a new reducer/selectors/actions, we could just leverage the new entities abstraction to automatically generate those. https://github.com/WordPress/gutenberg/blob/master/core-data/entities.js#L6

Currently, the entities only support fetching by id getEntityRecord but we should definitely introduce a findAll/findQuery as well getEntityRecords( state, kind, entity, query )

We should also add more tests in the process.

From #6761 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant