react-custom-component

1.0.0 • Public • Published

React Custom Componentis

Use web-components inside React application without issues.

Usage

import connectCustom from 'react-custom-component';
 
const CustomComponent = connectCustom('custom-component', ['custom-event']);
 
const App = (props) => (
    <CustomComponent onCustomEvent={() => console.log('make it works')} />
);

API

connectCustom(tag: string, events: string[])

React component wrapper for custom-components. Resolve issues like: custom event triggers, object attribute values parser.

Arguments
Properties Description Required
tag Custom component tag name Yes
events Custom events used by custom component Yes

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i react-custom-component

      Weekly Downloads

      2

      Version

      1.0.0

      License

      ISC

      Unpacked Size

      3.27 kB

      Total Files

      3

      Last publish

      Collaborators

      • matheusbordin