breact-wrap

Wrapper utility for breact

Usage no npm install needed!

<script type="module">
  import breactWrap from 'https://cdn.skypack.dev/breact-wrap';
</script>

README

breact-wrap

Build Status npm Version JS Standard

Wrapper utility for breact

Installation

$ npm install breact-wrap --save

Usage

'use strict'

const React = require('react')
const { combine } = require('breact-wrap')

class Component01 extends React.Component { /* ... */ }

// Combine wrappers
const WrappedComponent01 = combine(
  (Component) => class Wrapped extends Component {

  }
)(Component01)


Functions

Available functions

Signature Description
combine(wrappers) -> function Combine multiple wrappers into one
cycle() -> Promise Do with cycle
prefixOf(component) -> string Get prefix of wrapped component
scoped() -> Scoped

License

This software is released under the MIT License.

Links