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

react-with-gesture

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-with-gesture - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

9

dist/react-with-gesture.es.js

@@ -50,6 +50,2 @@ import React from 'react';

function _readOnlyError(name) {
throw new Error("\"" + name + "\" is read-only");
}
var initialState = {

@@ -181,5 +177,6 @@ x: 0,

_this._state = initialstate;
set = (_readOnlyError("set"), function (cb) {
set = function set(cb) {
return _this._state = cb(_this._state);
});
};
}

@@ -186,0 +183,0 @@

@@ -56,6 +56,2 @@ 'use strict';

function _readOnlyError(name) {
throw new Error("\"" + name + "\" is read-only");
}
var initialState = {

@@ -187,5 +183,6 @@ x: 0,

_this._state = initialstate;
set = (_readOnlyError("set"), function (cb) {
set = function set(cb) {
return _this._state = cb(_this._state);
});
};
}

@@ -192,0 +189,0 @@

{
"name": "react-with-gesture",
"version": "2.0.1",
"version": "2.0.2",
"description": "hoc for receiving gestures",

@@ -5,0 +5,0 @@ "main": "dist/react-with-gesture",

@@ -74,3 +74,3 @@ npm install react-with-gesture

```jsx
import { useSpring } from 'react-with-gesture'
import { useGesture } from 'react-with-gesture'

@@ -86,1 +86,9 @@ function App() {

```
### Transient mode
Provide the `transient` flag and it won't cause new render passes, instead you will be notified through the `onAction` callback. This works the same for Hoc's, render-props and hooks.
```jsx
const [handlers] = useGesture({ transient: true, onAction: e => console.log(e) })
```

@@ -106,3 +106,3 @@ import React from 'react'

this.state = initialstate
const set = this.setState.bind(this)
let set = this.setState.bind(this)
if (props.transient) {

@@ -109,0 +109,0 @@ this._state = initialstate

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