()
| 4 | import WizardContext from './wizardContext'; |
| 5 | |
| 6 | const useWizard = () => { |
| 7 | const context = React.useContext(WizardContext); |
| 8 | |
| 9 | if (!context && __DEV__) { |
| 10 | throw Error('Wrap your step with `Wizard`'); |
| 11 | } else { |
| 12 | return context as WizardValues; |
| 13 | } |
| 14 | }; |
| 15 | |
| 16 | export default useWizard; |
no outgoing calls
searching dependent graphs…