@wordpress/widget-primitives

This package is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.

The host-agnostic toolkit for widgets: the contract types that define what a
widget is, plus the runtime to discover widget types and resolve their render
modules.

Installation

Install the module:

npm install @wordpress/widget-primitives --save

This package assumes that your code will run in an ES2015+ environment.
If you’re using an environment that has limited or no support for such
language features and APIs, you should include the polyfill shipped in
@wordpress/babel-preset-default

in your code.

Setup

This package ships no stylesheets; there is nothing to enqueue or import.

The contract types, <WidgetRender>, and