New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rn-range-slider

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-range-slider - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

3

hooks.js

@@ -26,2 +26,3 @@ import React, { useCallback, useState, useRef, useMemo } from 'react';

const { low: lowState, high: highState } = inPropsRef.current;
const inPropsRefPrev = { lowPrev: lowState, highPrev: highState };

@@ -38,3 +39,3 @@ // Props have higher priority.

const setHigh = value => inPropsRef.current.high = value;
return { inPropsRef, setLow, setHigh };
return { inPropsRef, inPropsRefPrev, setLow, setHigh };
};

@@ -41,0 +42,0 @@

@@ -32,3 +32,3 @@ import React, { memo, useState, useEffect, useCallback, useMemo, useRef } from 'react';

) => {
const { inPropsRef, setLow, setHigh } = useLowHigh(lowProp, disableRange ? max : highProp, min, max, step);
const { inPropsRef, inPropsRefPrev, setLow, setHigh } = useLowHigh(lowProp, disableRange ? max : highProp, min, max, step);
const lowThumbXRef = useRef(new Animated.Value(0));

@@ -67,7 +67,7 @@ const highThumbXRef = useRef(new Animated.Value(0));

useEffect(() => {
const { low, high } = inPropsRef.current;
if ((lowProp !== undefined && lowProp !== low) || (highProp !== undefined && highProp !== high)) {
const { lowPrev, highPrev } = inPropsRefPrev;
if ((lowProp !== undefined && lowProp !== lowPrev) || (highProp !== undefined && highProp !== highPrev)) {
updateThumbs();
}
}, [highProp, inPropsRef, lowProp]);
}, [highProp, inPropsRefPrev.lowPrev, inPropsRefPrev.highPrev, lowProp]);

@@ -74,0 +74,0 @@ useEffect(() => {

{
"name": "rn-range-slider",
"version": "2.0.3",
"version": "2.0.4",
"author": "Tigran Sahakyan <mail.of.tigran@gmail.com>",

@@ -5,0 +5,0 @@ "description": "A highly optimized pure JS implementation of Range Slider for React Native",

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