/
Rics
/
JobReady
Обзор
Документация
Войти
/
Rics
/
JobReady
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Front/src/widgets/Compiler/context/CompilerContext.tsx
13 строк
341 B
Rics
add app
16 сен 2025, 16:56
16 сен 2025, 16:56
75981cd
Код
Авторство
О чём код?
import { createContext, useContext } from 'react'; export const CompilerContext = createContext<{ runCode: () => void; } | null>(null); export const useCompiler = () => { const ctx = useContext(CompilerContext); if (!ctx) { throw new Error("useCompiler must be used within a CompilerProvider"); } return ctx; };