@broxus/tvm-connect
Version:
TypeScript SDK for connecting to Nekoton-compatible wallets using a unified interface.
9 lines (8 loc) • 362 B
JavaScript
import * as React from 'react';
export function useContext(Context) {
const context = React.useContext(Context);
if (context == null) {
throw new Error(`use${Context.displayName || Context.constructor.name || 'Unknown'} must be used within a ${Context.displayName || Context.constructor.name || 'Unknown'}.Provider`);
}
return context;
}