πŸ“„ File detail

ink/hooks/use-app.ts

🧩 .tsπŸ“ 9 linesπŸ’Ύ 251 bytesπŸ“ text
← Back to All Files

🎯 Use case

This file lives under β€œink/”, which covers Ink terminal UI (layouts, TTY IO, keyboard, renderer components). It primarily provides a default export (component, class, or entry function). Dependencies touch React UI. It composes internal code from components (relative imports).

Generated from folder role, exports, dependency roots, and inline comments β€” not hand-reviewed for every path.

🧠 Inline summary

import { useContext } from 'react' import AppContext from '../components/AppContext.js' /** * `useApp` is a React hook, which exposes a method to manually exit the app (unmount).

πŸ“€ Exports (heuristic)

  • default

πŸ“š External import roots

Package roots from from "…" (relative paths omitted).

  • react

πŸ–₯️ Source preview

import { useContext } from 'react'
import AppContext from '../components/AppContext.js'

/**
 * `useApp` is a React hook, which exposes a method to manually exit the app (unmount).
 */
const useApp = () => useContext(AppContext)
export default useApp