UNPKG

react-native-screen-transitions

Version:
33 lines (31 loc) 605 B
"use strict"; import { makeMutable } from "react-native-reanimated"; const store = {}; const ensure = key => { let bag = store[key]; if (!bag) { bag = { progress: makeMutable(0), closing: makeMutable(0), animating: makeMutable(0) }; store[key] = bag; } return bag; }; export function getAnimation(key, type) { return ensure(key)[type]; } export function getAll(key) { return ensure(key); } function clear(routeKey) { "worklet"; delete store[routeKey]; } export const Animations = { getAnimation, clear, getAll }; //# sourceMappingURL=animations.js.map