INNER CODE UNIT · JavaScript
ActionButton
mastermoo/react-native-action-button · ActionButton.js:20
const ActionButton = props => {
const [, setResetToken] = useState(props.resetToken);
const [active, setActive] = useState(props.active);
const anim = useRef(new Animated.Value(props.active ? 1 : 0));
const timeout = useRef(null);
const mounted = useRef(false);
useEffect(() => {
mounted.current = true;
return () => {
mounted.current = false;
timeout.current && clearTimeout(timeout.current);
};
}, []);
useEffect(() => {
if (props.active) {