|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
619 bytes
|
| Rev | Line | |
|---|
| [a762898] | 1 | import { createContext, useContext, useMemo } from 'react';
|
|---|
| 2 | import { createDefaultAnimationManager } from './createDefaultAnimationManager';
|
|---|
| 3 | export var AnimationManagerContext = /*#__PURE__*/createContext(createDefaultAnimationManager);
|
|---|
| 4 | export function useAnimationManager(animationId, animationManagerFromProps) {
|
|---|
| 5 | var contextAnimationManager = useContext(AnimationManagerContext);
|
|---|
| 6 | return useMemo(() => animationManagerFromProps !== null && animationManagerFromProps !== void 0 ? animationManagerFromProps : contextAnimationManager(animationId), [animationId, animationManagerFromProps, contextAnimationManager]);
|
|---|
| 7 | } |
|---|
Note:
See
TracBrowser
for help on using the repository browser.