JSPM

@wordpress/compose

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 196413
  • Score
    100M100P100Q165000F
  • License GPL-2.0-or-later

WordPress Higher Order components

Package Exports

  • @wordpress/compose

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@wordpress/compose) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@wordpress/compose

The compose package is a collection of handy Higher Order Components you can use to wrap your WordPress components and provide some basic features like: State, instanceId, pure...

Installation

Install the module

npm install @wordpress/compose --save

Usage

import { withInstanceId } from '@wordpress/compose';

function WrappedComponent( props ) {
    return props.instanceId;
}

const ComponentWithInstanceIdProp = withInstanceId( WrappedComponent );

Refer to each Higher Order Component's README file for more details.



Code is Poetry.