The props
middleware is responsible for injecting static or dynamic properties into reusable components.
- name: props
- middleware dependencies: attributes
- all middleware dependencies: observe, attributes
- type: component middleware
- docs
npm install @nx-js/props-middleware
const component = require('@nx-js/core')
const observe = require('@nx-js/observe-middleware')
const attributes = require('@nx-js/attributes-middleware')
const props = require('@nx-js/props-middleware')
component()
.use(observe)
.use(attributes)
.use(props('name', 'age', 'items'))
.register('props-comp')
<props-comp name="Bob" age="12" @items="myItems">Hello World!</props-comp>