1 | import * as React from 'react';
|
2 |
|
3 | import TransitionProgressContext from './TransitionProgressContext';
|
4 |
|
5 | export default function useTransitionProgress() {
|
6 | const progress = React.useContext(TransitionProgressContext);
|
7 |
|
8 | if (progress === undefined) {
|
9 | throw new Error(
|
10 | "Couldn't find values for transition progress. Are you inside a screen in Native Stack?"
|
11 | );
|
12 | }
|
13 |
|
14 | return progress;
|
15 | }
|