web-component-wrapper
TypeScript icon, indicating that this package has built-in type declarations

0.0.486 • Public • Published

Project status

npm npm downloads

build

check types lint test

code coverage

documentation website

Use case

Encapsulate your components as web-components.

Data-Flow

Data can flow into a component via

  • External property set instance.value = 'value'
  • Trigger Events instance.triggerEvent('click')

Data can be communicated back via:

  • Properties console.log(instance.value)
  • Observable events instance.addEventListener('click', (event) => console.log(event.detail.value))

Configuring Data-Flow

A Web-Component-Wrapper component forwards (transformed) given properties into a wrapped react component via props and reads data via provided callbacks as part of props or as part of reacts ref object.

Dependents (1)

Package Sidebar

Install

npm i web-component-wrapper

Weekly Downloads

281

Version

0.0.486

License

CC-BY-3.0

Unpacked Size

308 kB

Total Files

16

Last publish

Collaborators

  • thaibault