![Malicious npm Package Typosquats react-login-page to Deploy Keylogger](https://cdn.sanity.io/images/cgdhsj6q/production/007b21d9cf9e03ae0bb3f577d1bd59b9d715645a-1024x1024.webp?w=400&fit=max&auto=format)
Research
Security News
Malicious npm Package Typosquats react-login-page to Deploy Keylogger
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
@react-spring/core
Advanced tools
Package description
@react-spring/core is a library for creating animations in React applications. It provides a set of hooks and utilities to create smooth and interactive animations with ease. The library is highly flexible and can be used for a wide range of animation tasks, from simple transitions to complex gesture-based interactions.
Basic Spring Animation
This feature allows you to create a basic spring animation. The `useSpring` hook is used to define the animation properties, and the `animated` component is used to apply these properties to a React element.
import { useSpring, animated } from '@react-spring/web';
function App() {
const styles = useSpring({
from: { opacity: 0 },
to: { opacity: 1 },
});
return <animated.div style={styles}>I will fade in</animated.div>;
}
Gesture-based Animation
This feature allows you to create gesture-based animations. The `useDrag` hook from `@use-gesture/react` is used to handle drag gestures, and the `useSpring` hook is used to animate the position of the element based on the drag gestures.
import { useSpring, animated } from '@react-spring/web';
import { useDrag } from '@use-gesture/react';
function Draggable() {
const [styles, api] = useSpring(() => ({ x: 0, y: 0 }));
const bind = useDrag(({ offset: [x, y] }) => api.start({ x, y }));
return <animated.div {...bind()} style={{ ...styles, width: 100, height: 100, background: 'lightblue' }} />;
}
Keyframe Animation
This feature allows you to create keyframe animations. The `useSpring` hook is used to define the keyframes and looping behavior of the animation.
import { useSpring, animated } from '@react-spring/web';
function KeyframeAnimation() {
const styles = useSpring({
loop: { reverse: true },
from: { x: 0 },
to: { x: 100 },
});
return <animated.div style={{ ...styles, width: 100, height: 100, background: 'lightcoral' }} />;
}
Framer Motion is a popular animation library for React that provides a simple API for creating animations and gestures. It offers more built-in features for complex animations and interactions compared to @react-spring/core, making it a good choice for more advanced use cases.
React Transition Group is a library for managing component transitions in React. It provides lower-level utilities for managing the lifecycle of animations, making it more flexible but also more complex to use compared to @react-spring/core.
React Move is a library for creating data-driven animations in React. It focuses on animating data changes and provides a declarative API for defining animations. It is more specialized for data-driven animations compared to the more general-purpose @react-spring/core.
Readme
The platform-agnostic core of react-spring
FAQs
Unknown package
The npm package @react-spring/core receives a total of 1,083,612 weekly downloads. As such, @react-spring/core popularity was classified as popular.
We found that @react-spring/core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
Security News
The JavaScript community has launched the e18e initiative to improve ecosystem performance by cleaning up dependency trees, speeding up critical parts of the ecosystem, and documenting lighter alternatives to established tools.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.