react-bind-properties
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -5,2 +5,4 @@ # Changelog | ||
### [1.0.3](https://github.com/calebdwilliams/react-bind-props-schema/compare/v1.0.2...v1.0.3) (2020-10-05) | ||
### [1.0.2](https://github.com/calebdwilliams/react-bind-props-schema/compare/v1.0.1...v1.0.2) (2020-10-05) | ||
@@ -7,0 +9,0 @@ |
{ | ||
"name": "react-bind-properties", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Add native property bindings to React for use with custom elements", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -9,4 +9,19 @@ # react-bind-properties-schema | ||
This JSX pragma allows users to bind to the property on a DOM node using the `bindProps` React prop. This new prop takes an object where the each key is treated as a DOM node property and each value is bound to that value. As an example, the two code snippets peform the same task the first in Angular and the second in React: | ||
This JSX pragma allows users to bind to the property on a DOM node using the `bindProps` React prop. This new prop takes an object where the each key is treated as a DOM node property and each value is bound to that value. As an example, the two code snippets peform the same task the first in React and the second in Angular: | ||
### React example with this package | ||
```jsx | ||
/** @jsx bindProps */ | ||
import bindProps from 'react-bind-properties' | ||
export function MyComponent () { | ||
const list = ['one', 'two', 'three'] | ||
return <custom-element bindProps={{ list }}></custom-element> | ||
} | ||
``` | ||
### Code equivalent in Angular | ||
```typescript | ||
@@ -23,17 +38,4 @@ import { Component } from '@angular/core'; | ||
and in React: | ||
## Installation | ||
```jsx | ||
/** @jsx bindProps */ | ||
import bindProps from 'react-bind-properties-schema' | ||
export function MyComponent () { | ||
const list = ['one', 'two', 'three'] | ||
return <custom-element bindProps={{ list }}></custom-element> | ||
} | ||
``` | ||
## Installing | ||
The recommended installation method of this package is through [npm](http://npmjs.com). If you are unfamiliar with the npm ecosystem, there is some great [documentation available on the npm website](https://docs.npmjs.com/cli/install). | ||
@@ -44,3 +46,3 @@ | ||
```bash | ||
npm i -D react-bind-properties-schema | ||
npm i -D react-bind-properties | ||
``` | ||
@@ -47,0 +49,0 @@ |
/*! | ||
* react-bind-properties v1.0.2 | ||
* react-bind-properties v1.0.3 | ||
* MIT Licensed | ||
@@ -4,0 +4,0 @@ */ |
/*! | ||
* react-bind-properties v1.0.2 | ||
* react-bind-properties v1.0.3 | ||
* MIT Licensed | ||
@@ -4,0 +4,0 @@ */ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26518
63