OleksiiKachan/wonder-engine

View on GitHub
src/context/useWonderEngineContext.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { useContext } from 'react';
import Context from './context';

/**
 * Types importss
 */
import type { WonderEngineContext } from './context';

/**
 * Types
 */
export interface useWonderEngineContext {
  (): WonderEngineContext;
}

const useWonderEngineContext: useWonderEngineContext = () => {
  const context = useContext<WonderEngineContext>(Context);

  return context;
};

export default useWonderEngineContext;