/ ink / hooks / use-app.ts
use-app.ts
1  import { useContext } from 'react'
2  import AppContext from '../components/AppContext.js'
3  
4  /**
5   * `useApp` is a React hook, which exposes a method to manually exit the app (unmount).
6   */
7  const useApp = () => useContext(AppContext)
8  export default useApp