MCPcopy Create free account
hub / github.com/WebReflection/neverland / useContext

Function useContext

test/neverland.js:408–420  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

406 return context;
407 };
408 var useContext = function useContext(context) {
409 var _current = current(),
410 hook = _current.hook,
411 args = _current.args;
412
413 var stack = hooks.get(context);
414 var info = {
415 hook: hook,
416 args: args
417 };
418 if (!stack.some(update$1, info)) stack.push(info);
419 return context.value;
420 };
421
422 function provide(value) {
423 if (this.value !== value) {

Callers

nothing calls this directly

Calls 1

currentFunction · 0.85

Tested by

no test coverage detected