
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@rot1024/use-transition
Advanced tools
React Hooks for transition animation like Transition component in react-transition-group
React Hooks for transition animation like Transition component in react-transition-group, but improves smooth transition
Transition component in react-transition-group, and use-transition are very nice. But they are incompatible with styled-components or Emotion, particularly with mountOnEnter
or unmountOnExit
.
In addition, react-transition-group and use-transition have incorrect transition duration when the transition direction is changed during the transition.
This library improves their problems. Following image is comparision of the libraries.
npm install --dev @rot1024/use-transition
# or
yarn add @rot1024/use-transition
import { useState } from "react";
import { styled } from "styled-components";
import useTransition from "@rot1024/use-transition";
const StyledDiv = styled.div`
transition: ${({ state }) => state === "entering" || state === "exiting" ? "all 1s ease" : ""};
opacity: ${({ state }) => state === "entering" || state === "entered" ? 1 : 0};
`;
const Component = () => {
const [isActive, setActive] = useState(false);
const state = useTransition(isActive, 1000, {
mountOnEnter: true,
unmountOnExit: true
});
// state is "entering", "entered", "exiting", "exited", or "unmounted"
const handleClick = useCallback(() => {
setActive(active => !active);
}, [isActive, setActive])
return (
<div>
<button onClick={handleClick}>Toggle</button>
{state === "unmounted" ? null : <StyledDiv state={state}>Transition</StyledDiv>}
</div>
);
};
MIT License
FAQs
React Hooks for transition animation like Transition component in react-transition-group
We found that @rot1024/use-transition 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.