WordPress provides a number of ways to retrieve data in Gutenbergs, one way I really like is the getEntityRecords selector. I have started using it more and more recently and find it great to use in my custom blocks.
Unfortunately, the documentation is a little sparse and there are some things to consider when working with it. However, once you start using it and its relatives, I think you’ll agree that it’s a great choice!(more…)