Sha256: 8ed9471aed7c95972e9a248f16ea7f0abbbfdf2a1e82a4d71067cd21d8dd345d
Contents?: true
Size: 670 Bytes
Versions: 23
Compression:
Stored size: 670 Bytes
Contents
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const JasonContext_1 = __importDefault(require("./JasonContext")); const react_1 = require("react"); function useSub(config, options = {}) { // useEffect uses strict equality const configJson = JSON.stringify(config); const subscribe = react_1.useContext(JasonContext_1.default).subscribe; react_1.useEffect(() => { // @ts-ignore return subscribe(config, options).remove; }, [configJson]); } exports.default = useSub;
Version data entries
23 entries across 23 versions & 1 rubygems
Version | Path |
---|---|
jason-rails-0.6.1 | client/lib/useSub.js |
jason-rails-0.6.0 | client/lib/useSub.js |
jason-rails-0.5.1 | client/lib/useSub.js |