Utils package
As we are using a multi-package-/mono repository we have the ability and advantage of modular package development. That means, coding which should be used in multiple plugins can be outsourced to an own package. This can also be done for PHP (packages/utils/src), but this does not matter here.
With create-wp-react-app create-workspace a main utils package in packages/utils is generated automatically.
Factories
All of your plugins can use the factories defined in packages/utils/lib/factory. They do a lot of work for you and implement a high standard for the following topics:
AJAX /
XMLHttpRequesthandler with predefined interfaces so all your WP REST API endpoints are typed, see also this.Object-orientated class to consume options coming from a localized PHP variable.
Last updated