Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amp-react-components

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amp-react-components - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

es/utils/ampSetState.js

4

CHANGELOG.md

@@ -0,1 +1,5 @@

## <small>1.5.1 (2019-10-21)</small>
* fix: add ampSetState util function ([22712cd](https://github.com/danhuang1202/amp-react-components/commit/22712cd))
## 1.5.0 (2019-10-15)

@@ -2,0 +6,0 @@

@@ -34,4 +34,4 @@ import commonjs from 'rollup-plugin-commonjs'

const viewPath = path.join(__dirname, '../src/components/view/')
fs.readdirSync(viewPath).forEach(filename => {
const componentViewPath = path.join(__dirname, '../src/components/view/')
fs.readdirSync(componentViewPath).forEach(filename => {
entries.push({

@@ -52,4 +52,4 @@ input: `src/components/view/${filename}`,

const utilPath = path.join(__dirname, '../src/components/util/')
fs.readdirSync(utilPath).forEach(filename => {
const componentUtilPath = path.join(__dirname, '../src/components/util/')
fs.readdirSync(componentUtilPath).forEach(filename => {
entries.push({

@@ -70,2 +70,19 @@ input: `src/components/util/${filename}`,

const utilPath = path.join(__dirname, '../src/utils/')
fs.readdirSync(utilPath).forEach(filename => {
entries.push({
input: `src/utils/${filename}`,
output: [
{
dir: `lib/utils`,
format: 'cjs'
},
{
dir: `es/utils`,
format: 'es'
}
]
})
})
const options = entries.map(entry => {

@@ -72,0 +89,0 @@ const { input, output } = entry

2

package.json
{
"name": "amp-react-components",
"version": "1.5.0",
"version": "1.5.1",
"description": "Render AMP components with React",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -110,2 +110,3 @@ # amp-react-components

function Compoment({...}) {

@@ -136,2 +137,20 @@ const id = "myAnimals"

}
```
- AMP.setState
```js
import { ampSetState } from 'amp-react-components/utils'
function Button(){
const state = {
foo: 'bar'
}
return (
<button
on=`tap:${ampSetState(state)}`
>
click me
</button>
)
}
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc