libreact icon indicating copy to clipboard operation
libreact copied to clipboard

Create pluggable component factory

Open streamich opened this issue 6 years ago • 0 comments

Create a factory that allows to easily create components that support plugins, just like Slate.

const Something = supportPlugins(SomethingWithoutPlugins);

<Something
  onSomeEvent={() => {}}
  renderSomething={(data) => {}}
  plugins={[
    {
      onSomeEvent={() => {}}
      renderSomething={(data) => {}}
    }
  ]}
/>

streamich avatar May 03 '18 14:05 streamich