{"_id":"pubnub-react","_rev":"26-e414c408ebd35347c07491571c9c9e04","name":"pubnub-react","dist-tags":{"beta":"2.0.0-beta.4","rc":"2.0.0-rc.0","latest":"3.0.2"},"versions":{"1.0.1":{"name":"pubnub-react","version":"1.0.1","keywords":["cloud","publish","subscribe","websockets","comet","bosh","xmpp","real-time","messaging"],"author":{"name":"PubNub","email":"support@pubnub.com"},"license":"MIT","_id":"pubnub-react@1.0.1","maintainers":[{"name":"pubnub","email":"stephen@pubnub.com"}],"homepage":"https://github.com/pubnub/react#readme","bugs":{"url":"https://github.com/pubnub/react/issues"},"dist":{"shasum":"682df4192d92640e81903a9631ca7b13131d81e5","tarball":"https://registry.npmjs.org/pubnub-react/-/pubnub-react-1.0.1.tgz","integrity":"sha512-U6yTZRGrbzZ0Vd3dypDO4PQ8HijAW7w8AuYrXzy/FCo4bd/VyybipFigZkZ8sBtWt1ivFPgGyEHy+XENi/gawA==","signatures":[{"sig":"MEQCIFPnrwEz0I4EjUHPzj8SMIoLq/o/3kUVeQsGq3cXChsnAiBPT0b4fnMlS/cNLmdsdAnMIrKBMY3IUc5YAKEAy1RjHA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/pubnub-react.js","_from":".","_shasum":"682df4192d92640e81903a9631ca7b13131d81e5","gitHead":"20c416b0be8d030d305cd06c345d1285fa7fec51","scripts":{"test":"gulp test"},"_npmUser":{"name":"pubnub","email":"stephen@pubnub.com"},"repository":{"url":"git+https://github.com/pubnub/react.git","type":"git"},"_npmVersion":"4.2.0","description":"Publish & Subscribe Real-time Messaging with PubNub","directories":{},"_nodeVersion":"7.10.0","dependencies":{"pubnub":"^4.10.0","immutability-helper":"^2.2.0"},"devDependencies":{"chai":"^4.0.2","gulp":"^3.9.1","babel":"^6.23.0","jsdom":"^7.0.2","mocha":"^3.2.0","react":"^15.5.4","enzyme":"^2.8.2","eslint":"^3.13.1","isparta":"^4.0.0","js-yaml":"^3.7.0","babelify":"^7.3.0","gulp-open":"^2.0.0","react-dom":"^15.5.4","babel-core":"^6.24.1","browserify":"^14.4.0","gulp-babel":"^6.1.2","gulp-clean":"^0.3.2","gulp-mocha":"^3.0.1","gulp-eslint":"^3.0.1","gulp-rename":"^1.2.2","gulp-uglify":"^3.0.0","json-loader":"^0.5.4","babel-eslint":"^7.2.3","babel-loader":"^6.2.10","run-sequence":"^1.2.2","gulp-istanbul":"^1.1.1","babel-register":"^6.18.0","imports-loader":"^0.7.0","webpack-stream":"^3.2.0","gulp-sourcemaps":"^2.5.0","gulp-load-plugins":"^1.5.0","babel-preset-react":"^6.24.1","babel-preset-es2015":"^6.24.1","eslint-plugin-mocha":"^4.9.0","eslint-config-pubnub":"^2.0.0","stats-webpack-plugin":"^0.6.1","eslint-plugin-flowtype":"^2.34.0","react-addons-test-utils":"^15.5.1","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-class-properties":"^6.19.0","babel-plugin-transform-flow-strip-types":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/pubnub-react-1.0.1.tgz_1501825896670_0.48326522880233824","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"pubnub-react","version":"1.0.2","keywords":["cloud","publish","subscribe","websockets","comet","bosh","xmpp","real-time","messaging"],"author":{"name":"PubNub","email":"support@pubnub.com"},"license":"MIT","_id":"pubnub-react@1.0.2","maintainers":[{"name":"pubnub","email":"stephen@pubnub.com"}],"homepage":"https://github.com/pubnub/react#readme","bugs":{"url":"https://github.com/pubnub/react/issues"},"dist":{"shasum":"9fed8ef754e1b35dbd2f50e327c6454ec6b02a9b","tarball":"https://registry.npmjs.org/pubnub-react/-/pubnub-react-1.0.2.tgz","integrity":"sha512-FMSoXvFISAiB1+iAq4mJFL0Qej3L7okJfvdGIt6L9qiy3Ktc0q8Up9vcV60A4zqLrUOV+2qkmTewA1huNXm8eg==","signatures":[{"sig":"MEUCIFoCIwQVSWie5VH+vw4EkLWffbOSB9B4t13m+HsKnzOkAiEA3EiVwhqQ2jqwCCQK+BDnh2AcUPzBn504231uuMAvGn8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/pubnub-react.js","_from":".","_shasum":"9fed8ef754e1b35dbd2f50e327c6454ec6b02a9b","gitHead":"faa5a5bc7731e8f645c70f3cfd3fe349a44785d8","scripts":{"test":"gulp test"},"_npmUser":{"name":"pubnub","email":"stephen@pubnub.com"},"repository":{"url":"git+https://github.com/pubnub/react.git","type":"git"},"_npmVersion":"4.2.0","description":"Publish & Subscribe Real-time Messaging with PubNub","directories":{},"_nodeVersion":"7.10.0","dependencies":{"pubnub":"^4.10.0","immutability-helper":"^2.2.0"},"devDependencies":{"chai":"^4.0.2","gulp":"^3.9.1","babel":"^6.23.0","jsdom":"^7.0.2","mocha":"^3.2.0","react":"^15.5.4","enzyme":"^2.8.2","eslint":"^3.13.1","isparta":"^4.0.0","js-yaml":"^3.7.0","babelify":"^7.3.0","gulp-open":"^2.0.0","react-dom":"^15.5.4","babel-core":"^6.24.1","browserify":"^14.4.0","gulp-babel":"^6.1.2","gulp-clean":"^0.3.2","gulp-mocha":"^3.0.1","gulp-eslint":"^3.0.1","gulp-rename":"^1.2.2","gulp-uglify":"^3.0.0","json-loader":"^0.5.4","babel-eslint":"^7.2.3","babel-loader":"^6.2.10","run-sequence":"^1.2.2","gulp-istanbul":"^1.1.1","babel-register":"^6.18.0","imports-loader":"^0.7.0","webpack-stream":"^3.2.0","gulp-sourcemaps":"^2.5.0","gulp-load-plugins":"^1.5.0","babel-preset-react":"^6.24.1","babel-preset-es2015":"^6.24.1","eslint-plugin-mocha":"^4.9.0","eslint-config-pubnub":"^2.0.0","stats-webpack-plugin":"^0.6.1","eslint-plugin-flowtype":"^2.34.0","react-addons-test-utils":"^15.5.1","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-class-properties":"^6.19.0","babel-plugin-transform-flow-strip-types":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/pubnub-react-1.0.2.tgz_1506099111216_0.3948745985981077","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"pubnub-react","version":"1.1.0","keywords":["cloud","publish","subscribe","websockets","comet","bosh","xmpp","real-time","messaging"],"author":{"name":"PubNub","email":"support@pubnub.com"},"license":"MIT","_id":"pubnub-react@1.1.0","maintainers":[{"name":"pubnub","email":"stephen@pubnub.com"}],"homepage":"https://github.com/pubnub/react#readme","bugs":{"url":"https://github.com/pubnub/react/issues"},"dist":{"shasum":"3d5ab85bf235c3e906323443010953e24814cd8b","tarball":"https://registry.npmjs.org/pubnub-react/-/pubnub-react-1.1.0.tgz","integrity":"sha512-ElAKIHyE1kMVByfCs0reua4NqQwlCh7RgoIbVaNSav+mY4PAODvB5FHuAcfStw/se3UjzZkb+A2SrjNB22WS6w==","signatures":[{"sig":"MEUCIDHdfO434sFRFRaIGbXPuTs0aBYcx1rmRn03vnOA8RtlAiEAmzyLfrZBTrFKkbS5Q3RjjRqSktpC9FkXktnoj0Xkh3M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/pubnub-react.js","_from":".","_shasum":"3d5ab85bf235c3e906323443010953e24814cd8b","gitHead":"c6a9d44fd15c28f22ae05fe39d5e87a9c3fa52a4","scripts":{"test":"gulp test"},"_npmUser":{"name":"pubnub","email":"stephen@pubnub.com"},"repository":{"url":"git+https://github.com/pubnub/react.git","type":"git"},"_npmVersion":"4.2.0","description":"Publish & Subscribe Real-time Messaging with PubNub","directories":{},"_nodeVersion":"7.10.0","dependencies":{"pubnub":"^4.10.0","immutability-helper":"^2.2.0"},"devDependencies":{"chai":"^4.0.2","gulp":"^3.9.1","babel":"^6.23.0","jsdom":"^7.0.2","mocha":"^3.2.0","react":"^15.5.4","enzyme":"^2.8.2","eslint":"^3.13.1","isparta":"^4.0.0","js-yaml":"^3.7.0","babelify":"^7.3.0","gulp-open":"^2.0.0","react-dom":"^15.5.4","babel-core":"^6.24.1","browserify":"^14.4.0","gulp-babel":"^6.1.2","gulp-clean":"^0.3.2","gulp-mocha":"^3.0.1","gulp-eslint":"^3.0.1","gulp-rename":"^1.2.2","gulp-uglify":"^3.0.0","json-loader":"^0.5.4","babel-eslint":"^7.2.3","babel-loader":"^6.2.10","run-sequence":"^1.2.2","gulp-istanbul":"^1.1.1","babel-register":"^6.18.0","imports-loader":"^0.7.0","webpack-stream":"^3.2.0","gulp-sourcemaps":"^2.5.0","gulp-load-plugins":"^1.5.0","babel-preset-react":"^6.24.1","babel-preset-es2015":"^6.24.1","eslint-plugin-mocha":"^4.9.0","eslint-config-pubnub":"^2.0.0","stats-webpack-plugin":"^0.6.1","eslint-plugin-flowtype":"^2.34.0","react-addons-test-utils":"^15.5.1","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-class-properties":"^6.19.0","babel-plugin-transform-flow-strip-types":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/pubnub-react-1.1.0.tgz_1509984886370_0.3896145422477275","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"pubnub-react","version":"1.1.1","keywords":["cloud","publish","subscribe","websockets","comet","bosh","xmpp","real-time","messaging"],"author":{"name":"PubNub","email":"support@pubnub.com"},"license":"MIT","_id":"pubnub-react@1.1.1","maintainers":[{"name":"pubnub","email":"stephen@pubnub.com"}],"homepage":"https://github.com/pubnub/react#readme","bugs":{"url":"https://github.com/pubnub/react/issues"},"dist":{"shasum":"7d9291cbde653dd641336d6adf0a215df2d2e13a","tarball":"https://registry.npmjs.org/pubnub-react/-/pubnub-react-1.1.1.tgz","integrity":"sha512-NMYTq/402CvA5QD4uuRckwCcFp72vLmEtlVkXAi4IvL+osZzl91G0HHmf3OdupGxvqh+QGEvCNvepikmez3fsw==","signatures":[{"sig":"MEYCIQDZMlF60CZC2BgaJQJU6T3upkOSx8n+RWdlfuWCZXq/DQIhAL5AHkBgLko2uyeHjqAZLhjYz54vNBpNSIQ77mALgtjx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/pubnub-react.js","_from":".","_shasum":"7d9291cbde653dd641336d6adf0a215df2d2e13a","gitHead":"25b045a39ad2c5df5d1960f28065c505e22d2eaf","scripts":{"test":"gulp test"},"_npmUser":{"name":"pubnub","email":"stephen@pubnub.com"},"repository":{"url":"git+https://github.com/pubnub/react.git","type":"git"},"_npmVersion":"4.2.0","description":"Publish & Subscribe Real-time Messaging with PubNub","directories":{},"_nodeVersion":"7.10.0","dependencies":{"pubnub":"^4.10.0","immutability-helper":"^2.2.0"},"devDependencies":{"chai":"^4.0.2","gulp":"^3.9.1","babel":"^6.23.0","jsdom":"^7.0.2","mocha":"^3.2.0","react":"^15.5.4","enzyme":"^2.8.2","eslint":"^3.13.1","isparta":"^4.0.0","js-yaml":"^3.7.0","babelify":"^7.3.0","gulp-open":"^2.0.0","react-dom":"^15.5.4","babel-core":"^6.24.1","browserify":"^14.4.0","gulp-babel":"^6.1.2","gulp-clean":"^0.3.2","gulp-mocha":"^3.0.1","gulp-eslint":"^3.0.1","gulp-rename":"^1.2.2","gulp-uglify":"^3.0.0","json-loader":"^0.5.4","babel-eslint":"^7.2.3","babel-loader":"^6.2.10","run-sequence":"^1.2.2","gulp-istanbul":"^1.1.1","babel-register":"^6.18.0","imports-loader":"^0.7.0","webpack-stream":"^3.2.0","gulp-sourcemaps":"^2.5.0","gulp-load-plugins":"^1.5.0","babel-preset-react":"^6.24.1","babel-preset-es2015":"^6.24.1","eslint-plugin-mocha":"^4.9.0","eslint-config-pubnub":"^2.0.0","stats-webpack-plugin":"^0.6.1","eslint-plugin-flowtype":"^2.34.0","react-addons-test-utils":"^15.5.1","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-class-properties":"^6.19.0","babel-plugin-transform-flow-strip-types":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/pubnub-react-1.1.1.tgz_1510717002180_0.274848785251379","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"pubnub-react","version":"1.2.0","keywords":["cloud","publish","subscribe","websockets","comet","bosh","xmpp","real-time","messaging"],"author":{"name":"PubNub","email":"support@pubnub.com"},"license":"MIT","_id":"pubnub-react@1.2.0","maintainers":[{"name":"pubnub","email":"stephen@pubnub.com"}],"homepage":"https://github.com/pubnub/react#readme","bugs":{"url":"https://github.com/pubnub/react/issues"},"dist":{"shasum":"85ffa87964cd59bbb355739d18b8ce6286973a2f","tarball":"https://registry.npmjs.org/pubnub-react/-/pubnub-react-1.2.0.tgz","integrity":"sha512-vqMMh7/G8Y+HR5+ykiram/pP4IToeSM4ie5Qh/YUkugeGHvAS81igw1im/uSPG4UstNYjEK19NMPV+qKt9L78w==","signatures":[{"sig":"MEYCIQDums+WYdHornumeoFALG0khkqWAws2zVyICyb+KLk+2gIhAN4L+F1gJlwSpI7krwAvlaSoCvI4rrlSb3g78GY+DtXe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/pubnub-react.js","_from":".","_shasum":"85ffa87964cd59bbb355739d18b8ce6286973a2f","gitHead":"9d83f66a20e37a40e6026f31761b6730b990ac50","scripts":{"test":"gulp test"},"_npmUser":{"name":"pubnub","email":"stephen@pubnub.com"},"repository":{"url":"git+https://github.com/pubnub/react.git","type":"git"},"_npmVersion":"4.2.0","description":"Publish & Subscribe Real-time Messaging with PubNub","directories":{},"_nodeVersion":"7.10.0","dependencies":{"pubnub":"^4.10.0","immutability-helper":"^2.2.0"},"devDependencies":{"chai":"^4.0.2","gulp":"^3.9.1","babel":"^6.23.0","jsdom":"^7.0.2","mocha":"^3.2.0","react":"^15.5.4","enzyme":"^2.8.2","eslint":"^3.13.1","isparta":"^4.0.0","js-yaml":"^3.7.0","babelify":"^7.3.0","gulp-open":"^2.0.0","react-dom":"^15.5.4","babel-core":"^6.24.1","browserify":"^14.4.0","gulp-babel":"^6.1.2","gulp-clean":"^0.3.2","gulp-mocha":"^3.0.1","gulp-eslint":"^3.0.1","gulp-rename":"^1.2.2","gulp-uglify":"^3.0.0","json-loader":"^0.5.4","babel-eslint":"^7.2.3","babel-loader":"^6.2.10","run-sequence":"^1.2.2","gulp-istanbul":"^1.1.1","babel-register":"^6.18.0","imports-loader":"^0.7.0","webpack-stream":"^3.2.0","gulp-sourcemaps":"^2.5.0","gulp-load-plugins":"^1.5.0","babel-preset-react":"^6.24.1","babel-preset-es2015":"^6.24.1","eslint-plugin-mocha":"^4.9.0","eslint-config-pubnub":"^2.0.0","stats-webpack-plugin":"^0.6.1","eslint-plugin-flowtype":"^2.34.0","react-addons-test-utils":"^15.5.1","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-class-properties":"^6.19.0","babel-plugin-transform-flow-strip-types":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/pubnub-react-1.2.0.tgz_1511800127577_0.09456856362521648","host":"s3://npm-registry-packages"}},"1.3.1":{"name":"pubnub-react","version":"1.3.1","keywords":["cloud","publish","subscribe","websockets","comet","bosh","xmpp","real-time","messaging"],"author":{"name":"PubNub","email":"support@pubnub.com"},"license":"MIT","_id":"pubnub-react@1.3.1","maintainers":[{"name":"pubnub","email":"stephen@pubnub.com"}],"homepage":"https://github.com/pubnub/react#readme","bugs":{"url":"https://github.com/pubnub/react/issues"},"dist":{"shasum":"46bc1e0a7ec38c224d77451dd1b8d98d88a19155","tarball":"https://registry.npmjs.org/pubnub-react/-/pubnub-react-1.3.1.tgz","fileCount":55,"integrity":"sha512-RA+gzJFEL3Q5Kwxr5Y3gYAThY1jastJnyvet7avng1zJkzd/LnvgheId6j5BHCa60QMCnZAZZjbA3W2ZCNcv7Q==","signatures":[{"sig":"MEQCIDyj60E3cES9Et4V+Yyx2uW7iS1zuk2jfcek2sTH/GI+AiBcRA2HuXKEkxnbv/mzX63L0ds0/kxbjd2kSu1pL/QIgw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":336543,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdBCvlCRA9TVsSAnZWagAABBgP/1AxKDhFAMFDWviLeAdT\nCz/p77kGjwE643D5rXWmZlvROh9JslIetBtPn8Be7bI5euIjO/KTcfrPzdFp\n5dL9qHFj02cZJ9h1dqVwUZLPuVJQaqWKzQ9Sisu4hePNhHMJMsbwxu4t6y6q\n9zfLjuRtvTlLzEJsji66O7oJSv3VtMShsdwFiiQ9ZlYPPFA7RIcmmbluYILp\nQyYGJrw5FsVVb/rMYVJYHMIlPqLKF3fW8i22zhf2Ptw5bmLgYv18JGzTuzW9\n4HlsYZaoS5f6oyVaAQBSW0TFVUbUlvfwi5B+rx4PXPHDbfGfdyMLW6vfR0JR\na0D8/nMJxylH2u102pq0hWNpyujy/0P+F7mFJ4hfjQCFsGOj8o+v2ckF0+lO\nE9gKflcvk7y+Qv3+WXXYayda/XXM4BXjFQQ/9MjcblB58Zt9v7DW/7nQTxg0\nIfY+502QupaIhsl5yefhtoTaap5FpkQrbcjJw6va+OcvX41Xn1tNIyvmhcf7\njuUWkLYxN4ufU9qOlrBpYLIKpc/Pp40VeY7hfu7vv4UCCM26FKCdHM0HcGy8\nyvuAwW44wCki0Rcb7uUoXgZnxdZed1qhxJKU7J++N0mymVp5qexpETyQ1A5D\nv2Jlh3XvHGQgIiD3SQ7Z6BOQk4jMVJN1jwq3iegrimPvGPyIMzC15+BWJdY5\ne+Fm\r\n=pV96\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./lib/pubnub-react.js","gitHead":"8f1d1f03e3b47495f4b2844e2b3b884b8c16038f","scripts":{"test":"gulp test"},"_npmUser":{"name":"davidnub","email":"david.lin@pubnub.com"},"repository":{"url":"git+https://github.com/pubnub/react.git","type":"git"},"_npmVersion":"6.9.0","description":"Publish & Subscribe Real-time Messaging with PubNub","directories":{},"_nodeVersion":"10.15.3","dependencies":{"pubnub":"^4.24.2","immutability-helper":"^2.2.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.0.2","gulp":"^3.9.1","babel":"^6.23.0","jsdom":"^7.0.2","mocha":"^3.2.0","react":"^15.5.4","enzyme":"^2.8.2","eslint":"^3.13.1","isparta":"^4.0.0","js-yaml":"^3.7.0","babelify":"^7.3.0","gulp-open":"^2.0.0","react-dom":"^15.5.4","babel-core":"^6.24.1","browserify":"^14.4.0","gulp-babel":"^6.1.2","gulp-clean":"^0.3.2","gulp-mocha":"^3.0.1","gulp-eslint":"^3.0.1","gulp-rename":"^1.2.2","gulp-uglify":"^3.0.0","json-loader":"^0.5.4","babel-eslint":"^7.2.3","babel-loader":"^6.2.10","run-sequence":"^1.2.2","gulp-istanbul":"^1.1.1","babel-register":"^6.18.0","imports-loader":"^0.7.0","webpack-stream":"^3.2.0","gulp-sourcemaps":"^2.5.0","gulp-load-plugins":"^1.5.0","babel-preset-react":"^6.24.1","babel-preset-es2015":"^6.24.1","eslint-plugin-mocha":"^4.9.0","eslint-plugin-react":"^7.13.0","eslint-config-pubnub":"^2.0.0","stats-webpack-plugin":"^0.6.1","eslint-plugin-flowtype":"^2.34.0","react-addons-test-utils":"^15.5.1","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-class-properties":"^6.19.0","babel-plugin-transform-flow-strip-types":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/pubnub-react_1.3.1_1560554469042_0.9688036967909519","host":"s3://npm-registry-packages"}},"2.0.0-beta.1":{"name":"pubnub-react","version":"2.0.0-beta.1","keywords":["cloud","publish","subscribe","websockets","comet","bosh","xmpp","real-time","messaging"],"author":{"name":"PubNub","email":"support@pubnub.com"},"license":"MIT","_id":"pubnub-react@2.0.0-beta.1","maintainers":[{"name":"pubnub","email":"stephen@pubnub.com"}],"homepage":"https://github.com/pubnub/react#readme","bugs":{"url":"https://github.com/pubnub/react/issues"},"dist":{"shasum":"fb0ee89bb144d538db92c0e3dafeaf0bdd55777d","tarball":"https://registry.npmjs.org/pubnub-react/-/pubnub-react-2.0.0-beta.1.tgz","fileCount":4,"integrity":"sha512-BPyTTBp5f4vGGTP1Mv+V8Qe9f1BXKbMy49a9W98g+o7hgekOdyGhp4k/wHESntxB5OAfsy1PFpXZiMgxc76Y+A==","signatures":[{"sig":"MEQCIEqJPKYcc8lOk37UmPAV0pa6iKKvj2i8dFxiyatfYKp8AiBE9J8RYDEt9G8MyGv1z92CO0wJH1fpY/VXXbtkxE46Pw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7150,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddvnyCRA9TVsSAnZWagAASnkP/0L5qCByROzL3q8Quj27\nvE3UXhBWVhzQS7QAYtNVMOiKcqVeeSrhzaW9iFruJNBJiAlrD+bQ8n2dgOD0\nqOai5RKW/Te1Tjr8xMLbWqW7CiwPB6KkaM/ycTjYSJBkE2+cOfLjS20+BG3s\nkIrxN2rgInG7evUTCdbBDWfmyA+Vj/DbgX+TGV4bZcrGLCnWXmaP8pvUT/yO\nM7TOEmIsXxD03/n2NDF75hdm7U+H8/ke5yC/YmzLLU4GUF659F5qtKaqq7yf\nl3D7b86FNkTIRxuLAAOMyGzC493fQVYqYCVkm8ET9YT7CknAsdZzAgNVHwjz\nuZJaoXopoeMwm0f6G6uXeiNeSLUIz7z4lmscyDZPBR9NfVnQJh/PYR+ji9G1\nQvapzW1z6yWbNpOjAbUnFpNi0hqKtJCdYt+Ca9+nuz/hlb/7jZs8qWqAHvEi\n+kwsyAu0/QpD2WHU71TfefJQVUOuFeKxbHqeLDwo597OOcafox48fP7Utfoy\n9OL+eQ9FdZWMVGVEOFqmp1XCKS3pvh6HPIyN2azmf0BRkUHVUr0I8Q5bdFmO\nwAL0rvSYRaCtTU8obviRo1xZm+/28sAdwP9EidDR7JM381Ig5OY7Sv6SomwM\ndG/Bt3gYFlWWhocrKpvErHleSY+TZObxE8C45L8z2yYDXAXbmJVnQgS7Zl8/\n/QA1\r\n=CBcD\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/**/*.(spec|test).{ts,tsx}"]},"main":"dist/index.js","husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"module":"dist/pubnub-react.esm.js","readme":"# PubNub React Framework v2.0 (BETA)\n\n> **This is a beta version of the PubNub React framework.**\n> It's provided as a preview of what's to come, and is _very likely_ to change before its GA release.\n\nWelcome to the new PubNub React framework!\nThis README provides a brief overview of the new framework; it assumes you're familiar with React, and with PubNub.\nThe [PubNub website](https://www.pubnub.com/) has many [tutorials](https://www.pubnub.com/blog/category/build/) and [demos](https://www.pubnub.com/developers/demos/), in addition to [SDK documentation](https://www.pubnub.com/docs/) and [REST API documentation](https://www.pubnub.com/docs/pubnub-rest-api-documentation).\n\n## Contents\n\n* [System requirements](#system-requirements)\n* [PubNubProvider](#pubnubprovider)\n* [PubNubConsumer](#pubnubconsumer)\n* [PubNubContext](#pubnubcontext)\n* [usePubNub hook](#usepubnub-hook)\n\n## System requirements\n\nTo use the PubNub React framework, you need:\n\n* React 16.8 or above\n* PubNub [Javascript SDK](https://www.pubnub.com/docs/web-javascript/pubnub-javascript-sdk)\n\n## PubNubProvider\n\nThe PubNubProvider makes available a PubNub client instance to a React component tree. You instantiate the provider as follows (note that your publish and subscribe keys are contained in the `pubnub.json` file):\n\n```js\nimport PubNub from 'pubnub';\nimport { PubNubProvider } from '../../src/index';\n\nconst pubNubConfig = require('../config/pubnub.json');\nconst pubNubClient = new PubNub(pubNubConfig.Demo.keySet);\n\nconst App = () => {\n  return (\n    <PubNubProvider client={pubNubClient}>\n      <MyRootComponent />\n    </PubNubProvider>\n  );\n};\n\nexport default App;\n```\n\n### PubNubProvider props\n\nThe PubNubProvider component takes a single prop:\n\n* **client** is the required pubNubClient instance. This is used by all components that require PubNub functionality.\n\n## PubNubConsumer\n\nThe PubNubConsumer allows you to access the client instance you made available with a PubNubProvider.\n\n### PubNubConsumer props\n\nThe PubNubConsumer component takes a single prop:\n\n* **client** is the required pubNubClient instance. This is used by all components that require PubNub functionality.\n\n### Example PubNubConsumer usage\n\nOnce you've created a PubNubProvider, you can access the client with a PubNubConsumer.\n\n```js\nimport React from 'react';\nimport PubNub from 'pubnub';\nimport { PubNubProvider } from '../PubNubProvider';\nimport { PubNubConsumer } from '../PubNubConsumer';\nimport { getPubNubContext } from '../PubNubContext';\n\nconst pubNubConfig = require('../config/pubnub.json');\nconst pubNubClient = new PubNub(pubNubConfig.Demo.keySet);\n\nconst App = () => {\n  <PubNubProvider client={pubNubClient}>\n    <PubNubConsumer>\n      {client => \"success!\" /* do something now */ }\n    </PubNubConsumer>\n  </PubNubProvider>\n};\n```\n\n## PubNubContext\n\nComing soon...\n\n## usePubNub hook\n\nThe PubNub hook lets you interact with PubNub in function components.\n\nHooks are a new feature added in React 16.8 that allow you to use React features without writing a class. For a general overview of hooks, refer to [the React documentation](https://reactjs.org/docs/hooks-intro.html).\n\n> **Note**: As you might expect, the `usePubNub` hook requires cleanup. For more information on the cleanup concept, refer to [the React documentation](https://reactjs.org/docs/hooks-effect.html#effects-with-cleanup).\n\n### Example usage\n\n```javascript\nimport React from 'react';\nimport { usePubNub } from '../../src/index';\n\nconst PubNubTime = () => {\n  const PubNubClient = usePubNub();\n\n  return (\n    <div>\n      {PubNubClient.time((status, response): void => {\n        if (status.error) console.log('error', status);\n        else console.log('response', response.timetoken);\n      })}\n    </div>\n  );\n};\n\nexport default PubNubTime;\n```\n\nThen, to load `PubNubTime` on-demand, you could use `React.Lazy` and `Suspense`:\n\n```javascript\nimport React, { Suspense, lazy } from 'react';\n\nconst MyRootComponent = () => {\n  const DisplayPubNubTime = lazy(() => import('./PubNubTime'));\n\n  return (\n    <Suspense fallback={<div>Loading. . .</div>}>\n      <DisplayPubNubTime />\n    </Suspense>\n  );\n};\n\nexport default MyRootComponent;\n```\n","gitHead":"25ac1e360af8ebf47dd249e6a0204835fc8d92bc","scripts":{"lint":"tsdx lint","test":"tsdx test --env=jsdom","build":"tsdx build","start":"tsdx watch"},"typings":"dist/index.d.ts","_npmUser":{"name":"davidnub","email":"david.lin@pubnub.com"},"prettier":{"semi":true,"printWidth":80,"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git://github.com/pubnub/react.git","type":"git"},"_npmVersion":"6.10.3","description":"Publish & Subscribe Real-time Messaging with PubNub","directories":{},"_nodeVersion":"10.15.3","dependencies":{"ts-invariant":"^0.4.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsdx":"^0.9.0","husky":"^3.0.2","react":"^16.9.0","tslib":"^1.10.0","pubnub":"^4.25.1","prettier":"^1.18.2","react-dom":"^16.9.0","typescript":"^3.5.3","@types/jest":"^24.0.18","@types/react":"^16.8.25","pretty-quick":"^1.11.1","@types/pubnub":"^4.0.6","@types/react-dom":"^16.8.5","@testing-library/react":"^9.1.3"},"peerDependencies":{"pubnub":"^4.25.1","@types/pubnub":"^4.0.6"},"_npmOperationalInternal":{"tmp":"tmp/pubnub-react_2.0.0-beta.1_1568078322074_0.10967957636997405","host":"s3://npm-registry-packages"}},"2.0.0-beta.2":{"name":"pubnub-react","version":"2.0.0-beta.2","keywords":["cloud","publish","subscribe","websockets","comet","bosh","xmpp","real-time","messaging"],"author":{"name":"PubNub","email":"support@pubnub.com"},"license":"MIT","_id":"pubnub-react@2.0.0-beta.2","maintainers":[{"name":"pubnub","email":"stephen@pubnub.com"}],"homepage":"https://github.com/pubnub/react#readme","bugs":{"url":"https://github.com/pubnub/react/issues"},"dist":{"shasum":"e7eece3d340b308b4108cad453c485f00a6ab069","tarball":"https://registry.npmjs.org/pubnub-react/-/pubnub-react-2.0.0-beta.2.tgz","fileCount":19,"integrity":"sha512-j7tIRQ8oL2zpjXEEuZAeC6AZF86Rf6wmfUoxSjsZMxba/THktodFbGERTCFo4EYNs750wn45SuV7+mwZZ+1xFQ==","signatures":[{"sig":"MEUCIAw4vjXuLhUhvAQe9T8AZZUHJeCXui2GLOTQPGCapiOUAiEAzuUfoez1iF+jV8nl7W1S7qXtbD0gRQ4Mhoj+0VeFr5E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24575,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeDjcCRA9TVsSAnZWagAAXy0P/juF2SIRg206GKwG+Fl1\npEfa1k1ZxwAaXl2/VmY5DxU3X3GxgMYYYjj0PbCaynNpWIaKh3jbMVvTd5K1\nuKtVQT6IOUCesiz2vkhToFhptzCLBy2CP75zq86YcepSlygcZmFFpXr6XUFU\ned3yK/ugNIq3RP8/X0CUkf1AgwQtbkdsEL0mqZNtNcESlW4Q1+W9LWM7xs6v\nk0P8nuow6MPEXEeP+Xt9rCgELLWwwhtkXbTEN5GRy6ClwrTPWxQ4y5CYp38u\nyAZXlKiJKJY+VwX2H7YJmqDzYXw2IKxbcPz9AMMqQSG+idPdMzf2dPQNKNai\n+5+vo+t5LkU0etTABWyCXxBcWfawM1aKRg8DjdV0DIvE+RblbDfHhzFo8M0d\nMYhz9FTvQPlXzMt4Vq0hMD3ZTf5SBosk1I4xvigE6ilFDUUHbpiyeGdbFj8n\nEwyhUyYjGSWMW4hZqAnHh8o1MdYcz0ekzpasfm6t+aUfkCuxt6dgx3Xs5UqK\ns6YANiOytknEVGWhW7M80GzC1aUnsSh4i/Iix1oqLvMIXYAN3pTwinkR+uG4\nZFuv/4fNwOgsmDxA1HdaVtRBL3cW7WIFjhcavy/jolq9nx3OJ2mGzOa1TQ2e\nsrnzbGreJbD83YxWrF3BLKe4VBzDAt5Z+HazMuflvlPWjMjsjoi76UdZIN5Q\nIj0+\r\n=SQ12\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/**/*.(spec|test).{ts,tsx}"]},"main":"dist/index.js","husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"module":"dist/pubnub-react.esm.js","gitHead":"4ded11968b8aba26e53c6d4437bf741a453bc7d4","scripts":{"lint":"tsdx lint","test":"tsdx test --env=jsdom","build":"tsdx build","start":"tsdx watch"},"typings":"dist/index.d.ts","_npmUser":{"name":"davidnub","email":"david.lin@pubnub.com"},"prettier":{"semi":true,"printWidth":80,"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git://github.com/pubnub/react.git","type":"git"},"_npmVersion":"6.10.3","description":"Publish & Subscribe Real-time Messaging with PubNub","directories":{},"_nodeVersion":"10.15.3","dependencies":{"ts-invariant":"^0.4.4"},"_hasShrinkwrap":false,"devDependencies":{"tsdx":"^0.9.0","husky":"^3.0.2","react":"^16.9.0","tslib":"^1.10.0","pubnub":"^4.25.1","prettier":"^1.18.2","react-dom":"^16.9.0","typescript":"^3.5.3","@types/jest":"^24.0.18","@types/react":"^16.8.25","pretty-quick":"^1.11.1","@types/pubnub":"^4.0.6","@types/react-dom":"^16.8.5","@testing-library/react":"^9.1.3"},"peerDependencies":{"pubnub":"^4.25.1","@types/pubnub":"^4.0.6"},"_npmOperationalInternal":{"tmp":"tmp/pubnub-react_2.0.0-beta.2_1568159963510_0.7100072610335093","host":"s3://npm-registry-packages"}},"2.0.0-beta.3":{"name":"pubnub-react","version":"2.0.0-beta.3","keywords":["cloud","publish","subscribe","websockets","comet","bosh","xmpp","real-time","messaging"],"author":{"name":"PubNub","email":"support@pubnub.com"},"license":"MIT","_id":"pubnub-react@2.0.0-beta.3","maintainers":[{"name":"pubnub","email":"stephen@pubnub.com"}],"homepage":"https://github.com/pubnub/react#readme","bugs":{"url":"https://github.com/pubnub/react/issues"},"dist":{"shasum":"1f328b78c5f236cb56af87b0a30d7076a7fc6fc4","tarball":"https://registry.npmjs.org/pubnub-react/-/pubnub-react-2.0.0-beta.3.tgz","fileCount":4,"integrity":"sha512-5meokvVjwI8qN1esqPAQvYcZCqB/GC+8QRnfN42/YZV8Gr+FRvmSUdkxb5UgpiMQiZwjp2kwwWkM/eKHpdkyCA==","signatures":[{"sig":"MEYCIQDVdBmZCXCwmHaxXsltSP1VnDhzNtaIDHgG1gTtAQk+kAIhAI+8JE3wckIZEYo0lBtc3+aEMnUhvgDLEGnHRJmbJJDu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7150,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeDsNCRA9TVsSAnZWagAA0bQP/jPvfm4VCcynYNmx/saF\n7msnEGYqj0NQobiEqVcBMuDTFXs1DWpoyNph0yY7c4XQY8JUkFp/Jvr+71wC\nUg0L8tQT3pWc4HuG5SMOoFNh5be69sVD7i8AAYD7lf/jxGMpfJo/8ViBZEDS\n5SE7YXoIeFZM5eNNnygRsWnrjf/joZ9K6ySXs0iDF3wnygNWHzhkxYbJ/2rj\nf1BEy3c8Pg4RVxs+Uxim7nkClXR7ctmbjYcHkorgSeosbEN50kgMHJ57e/zQ\na2D5iO9fTQ64gxy+XHyKmuIYePRs7w1uEK72174NlVcpM9K9NH0r9szDqjoT\nXZjB914ztiOb6R+Ge2C8TJbhosMw495bmHb4ERzIaLGIHmo5jNY8ZqYcGfDm\n1ds55eL/DMkkaq9k+/ZQ39GhsxAvFCkjfnUJ9oSWDsv5x2hPXrQwgjMzzZ3Q\nK2PASZ7HuILEPoX3OXxSYOSa4HsVRWGuaI+lbNgDnEgSzE53rzO1hmXWgyMF\n8eFX0No1eLjyN6ad3tPctysETjm3KSXlHTatxc8l3sZw9eaeKS3Nz0FwcW+z\njQXQWYbJc5tJBJNwAf6NMbMuWpNLr2i063DO/uKUIpYKjCoIIOaRViRCNQLP\nEnNKb43GMKZSeYLIqKKu7YplEG8rbth5qvYCng9HNo+cNBdsWNyC71+fQpNk\nqXo5\r\n=True\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/**/*.(spec|test).{ts,tsx}"]},"main":"dist/index.js","husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"module":"dist/pubnub-react.esm.js","readme":"# PubNub React Framework v2.0 (BETA)\n\n> **This is a beta version of the PubNub React framework.**\n> It's provided as a preview of what's to come, and is _very likely_ to change before its GA release.\n\nWelcome to the new PubNub React framework!\nThis README provides a brief overview of the new framework; it assumes you're familiar with React, and with PubNub.\nThe [PubNub website](https://www.pubnub.com/) has many [tutorials](https://www.pubnub.com/blog/category/build/) and [demos](https://www.pubnub.com/developers/demos/), in addition to [SDK documentation](https://www.pubnub.com/docs/) and [REST API documentation](https://www.pubnub.com/docs/pubnub-rest-api-documentation).\n\n## Contents\n\n* [System requirements](#system-requirements)\n* [PubNubProvider](#pubnubprovider)\n* [PubNubConsumer](#pubnubconsumer)\n* [PubNubContext](#pubnubcontext)\n* [usePubNub hook](#usepubnub-hook)\n\n## System requirements\n\nTo use the PubNub React framework, you need:\n\n* React 16.8 or above\n* PubNub [Javascript SDK](https://www.pubnub.com/docs/web-javascript/pubnub-javascript-sdk)\n\n## PubNubProvider\n\nThe PubNubProvider makes available a PubNub client instance to a React component tree. You instantiate the provider as follows (note that your publish and subscribe keys are contained in the `pubnub.json` file):\n\n```js\nimport PubNub from 'pubnub';\nimport { PubNubProvider } from '../../src/index';\n\nconst pubNubConfig = require('../config/pubnub.json');\nconst pubNubClient = new PubNub(pubNubConfig.Demo.keySet);\n\nconst App = () => {\n  return (\n    <PubNubProvider client={pubNubClient}>\n      <MyRootComponent />\n    </PubNubProvider>\n  );\n};\n\nexport default App;\n```\n\n### PubNubProvider props\n\nThe PubNubProvider component takes a single prop:\n\n* **client** is the required pubNubClient instance. This is used by all components that require PubNub functionality.\n\n## PubNubConsumer\n\nThe PubNubConsumer allows you to access the client instance you made available with a PubNubProvider.\n\n### PubNubConsumer props\n\nThe PubNubConsumer component takes a single prop:\n\n* **client** is the required pubNubClient instance. This is used by all components that require PubNub functionality.\n\n### Example PubNubConsumer usage\n\nOnce you've created a PubNubProvider, you can access the client with a PubNubConsumer.\n\n```js\nimport React from 'react';\nimport PubNub from 'pubnub';\nimport { PubNubProvider } from '../PubNubProvider';\nimport { PubNubConsumer } from '../PubNubConsumer';\nimport { getPubNubContext } from '../PubNubContext';\n\nconst pubNubConfig = require('../config/pubnub.json');\nconst pubNubClient = new PubNub(pubNubConfig.Demo.keySet);\n\nconst App = () => {\n  <PubNubProvider client={pubNubClient}>\n    <PubNubConsumer>\n      {client => \"success!\" /* do something now */ }\n    </PubNubConsumer>\n  </PubNubProvider>\n};\n```\n\n## PubNubContext\n\nComing soon...\n\n## usePubNub hook\n\nThe PubNub hook lets you interact with PubNub in function components.\n\nHooks are a new feature added in React 16.8 that allow you to use React features without writing a class. For a general overview of hooks, refer to [the React documentation](https://reactjs.org/docs/hooks-intro.html).\n\n> **Note**: As you might expect, the `usePubNub` hook requires cleanup. For more information on the cleanup concept, refer to [the React documentation](https://reactjs.org/docs/hooks-effect.html#effects-with-cleanup).\n\n### Example usage\n\n```javascript\nimport React from 'react';\nimport { usePubNub } from '../../src/index';\n\nconst PubNubTime = () => {\n  const PubNubClient = usePubNub();\n\n  return (\n    <div>\n      {PubNubClient.time((status, response): void => {\n        if (status.error) console.log('error', status);\n        else console.log('response', response.timetoken);\n      })}\n    </div>\n  );\n};\n\nexport default PubNubTime;\n```\n\nThen, to load `PubNubTime` on-demand, you could use `React.Lazy` and `Suspense`:\n\n```javascript\nimport React, { Suspense, lazy } from 'react';\n\nconst MyRootComponent = () => {\n  const DisplayPubNubTime = lazy(() => import('./PubNubTime'));\n\n  return (\n    <Suspense fallback={<div>Loading. . .</div>}>\n      <DisplayPubNubTime />\n    </Suspense>\n  );\n};\n\nexport default MyRootComponent;\n```\n","gitHead":"88012cec0d16a4cd23ec9ee0586e7efbf8b3083f","scripts":{"lint":"tsdx lint","test":"tsdx test --env=jsdom","build":"tsdx build","start":"tsdx watch"},"typings":"dist/index.d.ts","_npmUser":{"name":"davidnub","email":"david.lin@pubnub.com"},"prettier":{"semi":true,"printWidth":80,"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git://github.com/pubnub/react.git","type":"git"},"_npmVersion":"6.10.3","description":"Publish & Subscribe Real-time Messaging with PubNub","directories":{},"_nodeVersion":"10.15.3","dependencies":{"ts-invariant":"^0.4.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsdx":"^0.9.0","husky":"^3.0.2","react":"^16.9.0","tslib":"^1.10.0","pubnub":"^4.25.1","prettier":"^1.18.2","react-dom":"^16.9.0","typescript":"^3.5.3","@types/jest":"^24.0.18","@types/react":"^16.8.25","pretty-quick":"^1.11.1","@types/pubnub":"^4.0.6","@types/react-dom":"^16.8.5","@testing-library/react":"^9.1.3"},"peerDependencies":{"pubnub":"^4.25.1","@types/pubnub":"^4.0.6"},"_npmOperationalInternal":{"tmp":"tmp/pubnub-react_2.0.0-beta.3_1568160524717_0.38808269325018774","host":"s3://npm-registry-packages"}},"2.0.0-beta.4":{"name":"pubnub-react","version":"2.0.0-beta.4","keywords":["cloud","publish","subscribe","websockets","comet","bosh","xmpp","real-time","messaging"],"author":{"name":"PubNub","email":"support@pubnub.com"},"license":"MIT","_id":"pubnub-react@2.0.0-beta.4","maintainers":[{"name":"pubnub","email":"stephen@pubnub.com"}],"homepage":"https://github.com/pubnub/react#readme","bugs":{"url":"https://github.com/pubnub/react/issues"},"dist":{"shasum":"0a6039bdf4f1d8d81d03300e5c0dd9c9b654bdbe","tarball":"https://registry.npmjs.org/pubnub-react/-/pubnub-react-2.0.0-beta.4.tgz","fileCount":19,"integrity":"sha512-0zqj9GZtMt72rkJmlyst5h+Tr2pAhXqoHa+1Rm65sPfd+qHdf7FqTKtEP3HrbO9qakzEPaZC4wYz7WgGf9z32A==","signatures":[{"sig":"MEYCIQDbWZ9G49XNXdOJ16A5tNLfLzBCo/+gqaiWU4w3KXwE/gIhAKBWS2YMqDYu2rraECUzSB0cQoNhHPjVVQTuGayFlGt6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24575,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeDufCRA9TVsSAnZWagAA1+MP/2nlpUUGIKe/HjcOHRX8\nsh54XXVTFY+tfJSq/yfEdqWtcX4lkqTjpoiMl+1mV/Hgas0KSSpbwTHGDOEA\nHuUd7VdDJLMjkgV6q7Crda5PxLFOXIP8oChvdfyoMN/80Dl1CpVzLolKER5L\nR+10qJInuVDVJ+5T9cWQ++NgNEPT01v+JPVjl8cbz2btg18v9pzvhBwjN3FA\nFIg7+w0WXxyhdvgmSY73pui1pw48hPi7Rs6iLjacvJc7VXfpWkEyw4TPbbSq\nMJHF3SvozAcbDfurMARNI9hvJ6gUBA2r9qVB0ZRg4JzqVm5Qaw9ee4VAAh8G\nKpBiZ/rxjW4xGa02azV63wl/0yGTsujyZm9eARCqOrY+TfoIvvbgjhaVxz2W\nJtFK/aRUetefAw6rLZ8/wNeNIlkEqW+HU/tUx8/mHtFVr6LPmG5MVCk5w38l\n1so3YwoLSHpeWfTbJheo8Uq1hgJWLZqABrslsIZGmNj1Z44sjpMq6d2hGZrG\n+Jh09iBBC8Mnu8kLyaMAejifJrQ1TUDY9aeTtGVOwLQoY/5zVOnzqqQMTFTF\nvMPYHokTytegCtMcKiVkO5jCePbC8cQIsXSwGWcPUxjxrYgbrly4yinarLW7\nP2hn0p/MyyteWw3DNPSRlY2ip97vu0WZoHeiuemdYqcyo2Dch4xxbCxu1B4U\ntlCS\r\n=kJs/\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/**/*.(spec|test).{ts,tsx}"]},"main":"dist/index.js","husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"module":"dist/pubnub-react.esm.js","readme":"# PubNub React Framework v2.0 (BETA)\n\n> **This is a beta version of the PubNub React framework.**\n> It's provided as a preview of what's to come, and is _very likely_ to change before its GA release.\n\nWelcome to the new PubNub React framework!\nThis README provides a brief overview of the new framework; it assumes you're familiar with React, and with PubNub.\nThe [PubNub website](https://www.pubnub.com/) has many [tutorials](https://www.pubnub.com/blog/category/build/) and [demos](https://www.pubnub.com/developers/demos/), in addition to [SDK documentation](https://www.pubnub.com/docs/) and [REST API documentation](https://www.pubnub.com/docs/pubnub-rest-api-documentation).\n\n## Contents\n\n* [System requirements](#system-requirements)\n* [PubNubProvider](#pubnubprovider)\n* [PubNubConsumer](#pubnubconsumer)\n* [PubNubContext](#pubnubcontext)\n* [usePubNub hook](#usepubnub-hook)\n\n## System requirements\n\nTo use the PubNub React framework, you need:\n\n* React 16.8 or above\n* PubNub [Javascript SDK](https://www.pubnub.com/docs/web-javascript/pubnub-javascript-sdk)\n\n## PubNubProvider\n\nThe PubNubProvider makes available a PubNub client instance to a React component tree. You instantiate the provider as follows (note that your publish and subscribe keys are contained in the `pubnub.json` file):\n\n```js\nimport PubNub from 'pubnub';\nimport { PubNubProvider } from '../../src/index';\n\nconst pubNubConfig = require('../config/pubnub.json');\nconst pubNubClient = new PubNub(pubNubConfig.Demo.keySet);\n\nconst App = () => {\n  return (\n    <PubNubProvider client={pubNubClient}>\n      <MyRootComponent />\n    </PubNubProvider>\n  );\n};\n\nexport default App;\n```\n\n### PubNubProvider props\n\nThe PubNubProvider component takes a single prop:\n\n* **client** is the required pubNubClient instance. This is used by all components that require PubNub functionality.\n\n## PubNubConsumer\n\nThe PubNubConsumer allows you to access the client instance you made available with a PubNubProvider.\n\n### PubNubConsumer props\n\nThe PubNubConsumer component takes a single prop:\n\n* **client** is the required pubNubClient instance. This is used by all components that require PubNub functionality.\n\n### Example PubNubConsumer usage\n\nOnce you've created a PubNubProvider, you can access the client with a PubNubConsumer.\n\n```js\nimport React from 'react';\nimport PubNub from 'pubnub';\nimport { PubNubProvider } from '../PubNubProvider';\nimport { PubNubConsumer } from '../PubNubConsumer';\nimport { getPubNubContext } from '../PubNubContext';\n\nconst pubNubConfig = require('../config/pubnub.json');\nconst pubNubClient = new PubNub(pubNubConfig.Demo.keySet);\n\nconst App = () => {\n  <PubNubProvider client={pubNubClient}>\n    <PubNubConsumer>\n      {client => \"success!\" /* do something now */ }\n    </PubNubConsumer>\n  </PubNubProvider>\n};\n```\n\n## PubNubContext\n\nComing soon...\n\n## usePubNub hook\n\nThe PubNub hook lets you interact with PubNub in function components.\n\nHooks are a new feature added in React 16.8 that allow you to use React features without writing a class. For a general overview of hooks, refer to [the React documentation](https://reactjs.org/docs/hooks-intro.html).\n\n> **Note**: As you might expect, the `usePubNub` hook requires cleanup. For more information on the cleanup concept, refer to [the React documentation](https://reactjs.org/docs/hooks-effect.html#effects-with-cleanup).\n\n### Example usage\n\n```javascript\nimport React from 'react';\nimport { usePubNub } from '../../src/index';\n\nconst PubNubTime = () => {\n  const PubNubClient = usePubNub();\n\n  return (\n    <div>\n      {PubNubClient.time((status, response): void => {\n        if (status.error) console.log('error', status);\n        else console.log('response', response.timetoken);\n      })}\n    </div>\n  );\n};\n\nexport default PubNubTime;\n```\n\nThen, to load `PubNubTime` on-demand, you could use `React.Lazy` and `Suspense`:\n\n```javascript\nimport React, { Suspense, lazy } from 'react';\n\nconst MyRootComponent = () => {\n  const DisplayPubNubTime = lazy(() => import('./PubNubTime'));\n\n  return (\n    <Suspense fallback={<div>Loading. . .</div>}>\n      <DisplayPubNubTime />\n    </Suspense>\n  );\n};\n\nexport default MyRootComponent;\n```\n","gitHead":"8ee8e9f738b7f44d879b7e1116d0a755fc80f757","scripts":{"lint":"tsdx lint","test":"tsdx test --env=jsdom","build":"tsdx build","start":"tsdx watch"},"typings":"dist/index.d.ts","_npmUser":{"name":"davidnub","email":"david.lin@pubnub.com"},"prettier":{"semi":true,"printWidth":80,"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git://github.com/pubnub/react.git","type":"git"},"_npmVersion":"6.10.3","description":"Publish & Subscribe Real-time Messaging with PubNub","directories":{},"_nodeVersion":"10.15.3","dependencies":{"ts-invariant":"^0.4.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsdx":"^0.9.0","husky":"^3.0.2","react":"^16.9.0","tslib":"^1.10.0","pubnub":"^4.25.1","prettier":"^1.18.2","react-dom":"^16.9.0","typescript":"^3.5.3","@types/jest":"^24.0.18","@types/react":"^16.8.25","pretty-quick":"^1.11.1","@types/pubnub":"^4.0.6","@types/react-dom":"^16.8.5","@testing-library/react":"^9.1.3"},"peerDependencies":{"pubnub":"^4.25.1","@types/pubnub":"^4.0.6"},"_npmOperationalInternal":{"tmp":"tmp/pubnub-react_2.0.0-beta.4_1568160671171_0.8521169008897242","host":"s3://npm-registry-packages"}},"1.3.2":{"name":"pubnub-react","version":"1.3.2","keywords":["cloud","publish","subscribe","websockets","comet","bosh","xmpp","real-time","messaging"],"author":{"name":"PubNub","email":"support@pubnub.com"},"license":"MIT","_id":"pubnub-react@1.3.2","maintainers":[{"name":"pubnub","email":"stephen@pubnub.com"}],"homepage":"https://github.com/pubnub/react#readme","bugs":{"url":"https://github.com/pubnub/react/issues"},"dist":{"shasum":"822f9bddae91dd6960624426b24d51715626d6c5","tarball":"https://registry.npmjs.org/pubnub-react/-/pubnub-react-1.3.2.tgz","fileCount":33,"integrity":"sha512-VPHxEO6NDCePvCI8p6KFmGA7KDgED8uCeEoOcptdmnfYZ7lZehCNutoz7CEE2BMMW5+EqdLfpEcy3U9NU50lFQ==","signatures":[{"sig":"MEUCIDf8Y9orbrIHXsYunD3kD6lj4GHMyMwGOGivF2gML4lDAiEA24k239Xy8BvpDdsdGQ15BEn0um7WBikHtrTukoQ9xQQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381592,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeECfCRA9TVsSAnZWagAAbTUQAJ8nNZ8jSnBy6QODe97Q\n6Lbds8ht+1NCEzyV/kW0XlaOddscJHU7ILu+VEayyxiUzdqli3REBq2ESro8\nBepo4EcoNZGK5rd/gEVgyzvmFb2j8cvN5CyQch1rAZ9SXS2A7kGwJQ8yH8ek\nIJ/XOJrGcw5lK4El4+JsHi/xypDYwKQYT2KYA01AWY413U+to1p4eqyRAfCo\nMKlbm7gKGZmmnuRMrzsq5poDd5nan9gaTruHBkYVyqS/tPjT/AYFOg+n9DZt\nLhzksy7f6OR278Wv3D6PvA1vByCCwIVXm/BpiAOh6KGaIen1p+ItKhur6+DE\n5LOqFMflG9tdXh64IxBTRvnmIfa3J+5KZoKDbNeNrusQfV7RQavfJmLka6qO\nfa2FwPXDWHPJAfan04T5SE80wvEeFu+urkfjTNlq3KbhuZokh7z8CT5dBgZ3\ndvFVMdCyM1LRtZnO/sg6/KkBU01wt6amnCZWsr4naEDbZDnwigi1wwzKk8SO\nlcmxIuYJLGmPChv3CB33ntcfY4Hxe//+BesaMYulfgTz0wypZbuHNucim6Cz\nfoQjAPA1f17mE+gWe93yyy9BP6VChm9bPTDJ21oGon5KVRfDQbUPdLC3Lx7K\nUkRvEpYdmQCH69RBHVpy54/2Bz14Exll5zcVt2ge6u6eawpEJjEe2oCE2I0e\ntkxc\r\n=PcbR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./lib/pubnub-react.js","gitHead":"760b8b6a7ee5d906e0cfa70c94b458ba0ee42c44","scripts":{"test":"gulp test"},"_npmUser":{"name":"davidnub","email":"david.lin@pubnub.com"},"repository":{"url":"git+https://github.com/pubnub/react.git","type":"git"},"_npmVersion":"6.10.3","description":"Publish & Subscribe Real-time Messaging with PubNub","directories":{},"_nodeVersion":"10.15.3","dependencies":{"pubnub":"^4.24.2","immutability-helper":"^2.2.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.0.2","gulp":"^3.9.1","babel":"^6.23.0","jsdom":"^7.0.2","mocha":"^3.2.0","react":"^15.5.4","enzyme":"^2.8.2","eslint":"^3.13.1","isparta":"^4.0.0","js-yaml":"^3.7.0","babelify":"^7.3.0","gulp-open":"^2.0.0","react-dom":"^15.5.4","babel-core":"^6.24.1","browserify":"^14.4.0","gulp-babel":"^6.1.2","gulp-clean":"^0.3.2","gulp-mocha":"^3.0.1","gulp-eslint":"^3.0.1","gulp-rename":"^1.2.2","gulp-uglify":"^3.0.0","json-loader":"^0.5.4","babel-eslint":"^7.2.3","babel-loader":"^6.2.10","run-sequence":"^1.2.2","gulp-istanbul":"^1.1.1","babel-register":"^6.18.0","imports-loader":"^0.7.0","webpack-stream":"^3.2.0","gulp-sourcemaps":"^2.5.0","gulp-load-plugins":"^1.5.0","babel-preset-react":"^6.24.1","babel-preset-es2015":"^6.24.1","eslint-plugin-mocha":"^4.9.0","eslint-plugin-react":"^7.13.0","eslint-config-pubnub":"^2.0.0","stats-webpack-plugin":"^0.6.1","eslint-plugin-flowtype":"^2.34.0","react-addons-test-utils":"^15.5.1","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-class-properties":"^6.19.0","babel-plugin-transform-flow-strip-types":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/pubnub-react_1.3.2_1568161950487_0.6024984214562692","host":"s3://npm-registry-packages"}},"2.0.0-rc.0":{"name":"pubnub-react","version":"2.0.0-rc.0","keywords":["cloud","publish","subscribe","websockets","comet","bosh","xmpp","real-time","messaging"],"author":{"name":"PubNub","email":"support@pubnub.com"},"license":"MIT","_id":"pubnub-react@2.0.0-rc.0","maintainers":[{"name":"pubnub","email":"stephen@pubnub.com"}],"homepage":"https://github.com/pubnub/react#readme","bugs":{"url":"https://github.com/pubnub/react/issues"},"dist":{"shasum":"31d3fbd292f5c9d0e8ffff5e3975e4f35bbea842","tarball":"https://registry.npmjs.org/pubnub-react/-/pubnub-react-2.0.0-rc.0.tgz","fileCount":19,"integrity":"sha512-6xhm2FRlw44hSx7q3axwFegLHmhG8z4exEGWE0u0JQ6OfQRnsLe00HyZG3UoCia4/AxLVX/YS1/U1oYlVVBNbg==","signatures":[{"sig":"MEQCIG1mw92wMLelsD1xX8NGcSUjqViEVhlMSEsGBaeeQRjNAiAQKbXMpqYYBGBlw+mzlYy0dhQI0J0LA0ur1hXHYdADiQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQWDrCRA9TVsSAnZWagAARowP/ioLlgJP7j2BNVoLZFnS\nZkuiLMbjfjYoG+3Wdm6m6HC/+poZZXEGbAYYHsIFLaLNCr91M02PGAcMPsNB\n9+6yCKRUcWXoKpDNQDFiujUb3g+/FDOUFNxDYGT3K5mYnBauWuk4C/sA3263\nvm2mrXCtIQ/29iV/3GS1t6SmGPcOWTP5Bue3HqALjSoisTM3G9BcjMhf29sL\nIldPhJOg6l/8b4nB+ugZck3MFw5nUbl7rPw2h5vl9OCHLu3vLdsXqk28UJJx\nh0wln7yUQAdMv4Xjfur+gUg+usf23ffx5tjAHVavRftAgGSPfc/MKh9a9W0d\nXDPVBcjzfNktBdMD6Jbwas8SFz9x8J3Fv3hQkO0nNtiju5pkyUjYBdhOARDP\nAD4XUq6tvD2VhbcJRdu7cu2NQCF1UCY5fbWkDHQRTzUoJcnDMdVTWqkxHU+A\niSOlXMrOHv433GWQcHQ7jC9vNbFTqyAsnxxgX6afZDVbgRhzmHISxotyMe5t\nFDkdrfUkvFY2mCJW7RDDWkusAjzjDgNJKU5EvBl7wEw/fekLV1uVMqotKwm9\nP9tkSVD2bATUuaN9IXtsKfvHiWTRb3k8BT3xT7g+4NMm6Jq12sM1zUWW7q/S\nGvMRCX9SngtWLxvfvGquKMLrTp9YlOguGW93/GOh29k8qbYXQcqcYy278ppt\nB+GL\r\n=G35s\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/**/*.(spec|test).{ts,tsx}"]},"main":"dist/index.js","husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"module":"dist/pubnub-react.esm.js","readme":"# PubNub React Framework v2.0 (BETA)\n\n> **This is a beta version of the PubNub React framework.**\n> It's provided as a preview of what's to come, and is _very likely_ to change before its GA release.\n\nWelcome to the new PubNub React framework!\nThis README provides a brief overview of the new framework; it assumes you're familiar with React, and with PubNub.\nThe [PubNub website](https://www.pubnub.com/) has many [tutorials](https://www.pubnub.com/blog/category/build/) and [demos](https://www.pubnub.com/developers/demos/), in addition to [SDK documentation](https://www.pubnub.com/docs/) and [REST API documentation](https://www.pubnub.com/docs/pubnub-rest-api-documentation).\n\n## Contents\n\n- [Quick start](#quick-start)\n- [System requirements](#system-requirements)\n- [PubNubProvider](#pubnubprovider)\n- [PubNubConsumer](#pubnubconsumer)\n- [PubNubContext](#pubnubcontext)\n- [usePubNub hook](#usepubnub-hook)\n\n## Quick start\n\n**To get started right away**, do the following:\n\n1. Set up your React project.\n\n   For a quick single-page app, [create-react-app](https://reactjs.org/docs/create-a-new-react-app.html#create-react-app) is a good starting point:\n\n   ```bash\n   npx create-react-app hello-pubnub-react\n   ```\n\n1. Add the PubNub JavaScript SDK and React framework packages to your project:\n\n   ```bash\n   npm install pubnub\n   npm install pubnub-react@beta\n   ```\n\n1. Replace the contents of `src/App.js` with the following:\n\n   ```javascript\n   import React, { useState } from 'react';\n   import PubNub from 'pubnub';\n   import { PubNubProvider, PubNubConsumer } from 'pubnub-react';\n   import './App.css';\n\n   const pubnub = new PubNub({\n     publishKey: <YOUR PUB KEY>,\n     subscribeKey: <YOUR SUB KEY>,\n   });\n   const channels = ['awesomeChannel'];\n\n   function App() {\n     const [messages, addMessage] = useState([]);\n     const [message, setMessage] = useState('');\n\n     const sendMessage = message => {\n       pubnub.publish(\n         {\n           channel: channels[0],\n           message,\n         },\n         () => setMessage('')\n       );\n     };\n\n     return (\n       <PubNubProvider client={pubnub}>\n         <div className=\"App\">\n           <header className=\"App-header\">\n             <PubNubConsumer>\n               {client => {\n                 client.addListener({\n                   message: messageEvent => {\n                     addMessage([...messages, messageEvent.message]);\n                   },\n                 });\n\n                 client.subscribe({ channels });\n               }}\n             </PubNubConsumer>\n             <div\n               style={{\n                 width: '500px',\n                 height: '300px',\n                 border: '1px solid black',\n               }}\n             >\n               <div style={{ backgroundColor: 'grey' }}>React Chat Example</div>\n               <div\n                 style={{\n                   backgroundColor: 'white',\n                   height: '260px',\n                   overflow: 'scroll',\n                 }}\n               >\n                 {messages.map((message, messageIndex) => {\n                   return (\n                     <div\n                       key={`message-${messageIndex}`}\n                       style={{\n                         display: 'inline-block',\n                         float: 'left',\n                         backgroundColor: '#eee',\n                         color: 'black',\n                         borderRadius: '20px',\n                         margin: '5px',\n                         padding: '8px 15px',\n                       }}\n                     >\n                       {message}\n                     </div>\n                   );\n                 })}\n               </div>\n               <div\n                 style={{\n                   display: 'flex',\n                   height: '40px',\n                   backgroundColor: 'lightgrey',\n                 }}\n               >\n                 <input\n                   type=\"text\"\n                   style={{\n                     borderRadius: '5px',\n                     flexGrow: 1,\n                     fontSize: '18px',\n                   }}\n                   placeholder=\"Type your message\"\n                   value={message}\n                   onChange={e => setMessage(e.target.value)}\n                 />\n                 <button\n                   style={{\n                     backgroundColor: 'blue',\n                     color: 'white',\n                     borderRadius: '5px',\n                     fontSize: '16px',\n                   }}\n                   onClick={e => {\n                     e.preventDefault();\n                     sendMessage(message);\n                   }}\n                 >\n                   Send Message\n                 </button>\n               </div>\n             </div>\n           </header>\n         </div>\n       </PubNubProvider>\n     );\n   }\n\n   export default App;\n   ```\n\n1. In your project, run the following command:\n\n   ```bash\n   npm start\n   ```\n\n   You should see the following in your browser:\n\n   ![chat UI screenshot][qs-screenshot]\n\n## System requirements\n\nTo use the PubNub React framework, you need:\n\n- React 16.8 or above\n- PubNub [Javascript SDK](https://www.pubnub.com/docs/web-javascript/pubnub-javascript-sdk)\n\n## PubNubProvider\n\nThe PubNubProvider makes available a PubNub client instance to a React component tree. You instantiate the provider as follows (note that this example assumes that your publish and subscribe keys are contained in the `pubnub.config.json` file):\n\n```js\nimport PubNub from 'pubnub';\nimport { PubNubProvider } from 'pubnub-react';\n\nconst pubNubConfig = require('./pubnub.config.json');\nconst pubNubClient = new PubNub(pubNubConfig.Demo.keySet);\n\nconst App = () => {\n  return (\n    <PubNubProvider client={pubNubClient}>\n      <MyRootComponent />\n    </PubNubProvider>\n  );\n};\n\nexport default App;\n```\n\n### PubNubProvider props\n\nThe PubNubProvider component takes a single prop:\n\n- **client** is the required pubNubClient instance. This is used by all components that require PubNub functionality.\n\n## PubNubConsumer\n\nThe PubNubConsumer allows you to access the client instance you made available with a PubNubProvider.\n\n### PubNubConsumer props\n\nThe PubNubConsumer component takes a single prop:\n\n- **client** is the required pubNubClient instance. This is used by all components that require PubNub functionality.\n\n### Example PubNubConsumer usage\n\nOnce you've created a PubNubProvider, you can access the client with a PubNubConsumer.\n\n```js\nimport React from 'react';\nimport PubNub from 'pubnub';\nimport { PubNubProvider } from '../PubNubProvider';\nimport { PubNubConsumer } from '../PubNubConsumer';\nimport { getPubNubContext } from '../PubNubContext';\n\nconst pubNubConfig = require('../config/pubnub.json');\nconst pubNubClient = new PubNub(pubNubConfig.Demo.keySet);\n\nconst App = () => {\n  return (\n    <PubNubProvider client={pubNubClient}>\n      <PubNubConsumer>\n        {client => 'success!' /* do something now */}\n      </PubNubConsumer>\n    </PubNubProvider>\n  );\n};\n```\n\n## PubNubContext\n\nComing soon...\n\n## usePubNub hook\n\nThe PubNub hook lets you interact with PubNub in function components.\n\nHooks are a new feature added in React 16.8 that allow you to use React features without writing a class. For a general overview of hooks, refer to [the React documentation](https://reactjs.org/docs/hooks-intro.html).\n\n> **Note**: As you might expect, the `usePubNub` hook requires cleanup. For more information on the cleanup concept, refer to [the React documentation](https://reactjs.org/docs/hooks-effect.html#effects-with-cleanup).\n\n### Example usage\n\n```javascript\nimport React, { useState, useEffect } from 'react';\nimport { usePubNub } from '../../src/index';\n\nconst PubNubTime = () => {\n  const client = usePubNub();\n  const [time, setTime] = useState(null);\n\n  useEffect(() => {\n    client\n      .time()\n      .then(({ timetoken }) => {\n        setTime(timetoken);\n      })\n      .catch(error => {\n        console.log(error);\n      });\n  }, []);\n\n  return <div>{time}</div>;\n};\n\nexport default PubNubTime;\n```\n\nThen, to load `PubNubTime` on-demand, you could use `React.Lazy` and `Suspense`:\n\n```javascript\nimport React, { Suspense, lazy } from 'react';\n\nconst MyRootComponent = () => {\n  const DisplayPubNubTime = lazy(() => import('./PubNubTime'));\n\n  return (\n    <Suspense fallback={<div>Loading. . .</div>}>\n      <DisplayPubNubTime />\n    </Suspense>\n  );\n};\n\nexport default MyRootComponent;\n```\n\n[qs-screenshot]: ./assets/quickstart-screenshot.png\n","gitHead":"1bae3e4e26da8f8f843f452e4e255d248d6a3d63","scripts":{"lint":"tsdx lint","test":"tsdx test --env=jsdom","build":"tsdx build","start":"tsdx watch"},"typings":"dist/index.d.ts","_npmUser":{"name":"are","email":"me@iama.re"},"prettier":{"semi":true,"printWidth":80,"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git://github.com/pubnub/react.git","type":"git"},"_npmVersion":"6.13.4","description":"Publish & Subscribe Real-time Messaging with PubNub","directories":{},"_nodeVersion":"12.14.1","dependencies":{"ts-invariant":"^0.4.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsdx":"^0.9.0","husky":"^3.0.2","react":"^16.9.0","tslib":"^1.10.0","pubnub":"^4.25.1","prettier":"^1.18.2","react-dom":"^16.9.0","typescript":"^3.5.3","@types/jest":"^24.0.18","@types/react":"^16.8.25","pretty-quick":"^1.11.1","@types/pubnub":"^4.25.1","@types/react-dom":"^16.8.5","@rollup/plugin-replace":"^2.3.0","@testing-library/react":"^9.1.3"},"peerDependencies":{"pubnub":"^4.27.3","@types/pubnub":"^4.25.1"},"_npmOperationalInternal":{"tmp":"tmp/pubnub-react_2.0.0-rc.0_1581342955284_0.05461350615763805","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"pubnub-react","version":"2.0.0","keywords":["cloud","publish","subscribe","websockets","comet","bosh","xmpp","real-time","messaging"],"author":{"name":"PubNub","email":"support@pubnub.com"},"license":"MIT","_id":"pubnub-react@2.0.0","maintainers":[{"name":"pubnub","email":"stephen@pubnub.com"}],"homepage":"https://github.com/pubnub/react#readme","bugs":{"url":"https://github.com/pubnub/react/issues"},"dist":{"shasum":"c42f466fb0bb468b45acc2e04b9cf4e50ba3253b","tarball":"https://registry.npmjs.org/pubnub-react/-/pubnub-react-2.0.0.tgz","fileCount":19,"integrity":"sha512-G9WvaQozWx7jhaPgxNht0o/YLsvOgYL32t9rFWbklJ+nRQbajEDWhzqgzv5NbHc5867ka7bGMLjnx9Dqreaebw==","signatures":[{"sig":"MEUCIHfY7TMJtRi4C4mwVTQmqXp0YZzB0q2LckRQVtyCYB5GAiEA3thtT/33bq5hhtttLq89ksKEblEw0BPM8RuciDYljQo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27912,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeREwaCRA9TVsSAnZWagAAn7IP/3kjZ/ymix21IJXMck+x\nUI4SZJri9tOlyTcMnU21RXs7CuEGQTCKHNGpV/REJ1Pjj95dEF0FbCNUk258\npnLn7YW8BLbQ3CubqvRMRtkcnbsa0ivba0GQWnk/B5orP6AeAIBpN1YIIZ00\nmmEzKQcY7A2rDCuklqMld13Bl4hB8dP9/tynWkBX6QbSxC4dCNSGYuEM0tUF\nmuU/ErtyBrmYUQgu0fxgGcNhBUcEO5BtIXVK/eIcydwFx/KMcWX3LCbNqey/\n8LzBJG8e/CvKzmWWr35/DH82vFetc4PVTqhWSx7drpH2MyB9ARaQg9pjkQR2\nnoA/9f7dS5YRN6jV69y3h4g7zCmpBRQolLNTR++snBN+3Ht7Eh0FfpIqRYEv\nvErtwW08aV8KydNL6iyUAJYd+mfZaTH3umeWRW5l4JBlFCUUg4yAO6xvrzl+\nq87xpsoSTfIMoTo/gb3mTYlYSMKjSuGIR6Zl9Wu6tOZ/ykyjakwGzpShlZuf\nqief18S0BK+VqOBI0bADRqOhhxRRuDqwRVNOkYVAxnOQsmyzL3OmK8Plzbh1\nmcJdclCnOIqcC/BYnMz+LJQpwJa0XfndNw8c5vIacU6+kTtvln4/6e/jQnYX\n/IhoywVT9IzTfUAoUaOXOA/D617hsxTZ7rb2sjNvhV8h35EIBMA+SzexPdTA\n6Xs8\r\n=X8K/\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/**/*.(spec|test).{ts,tsx}"]},"main":"dist/index.js","husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"module":"dist/pubnub-react.esm.js","gitHead":"54ba4ceaa570567b4454b16a963574f9cf0ce72e","scripts":{"lint":"tsdx lint","test":"tsdx test --env=jsdom","build":"tsdx build","start":"tsdx watch"},"typings":"dist/index.d.ts","_npmUser":{"name":"are","email":"me@iama.re"},"prettier":{"semi":true,"printWidth":80,"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git://github.com/pubnub/react.git","type":"git"},"_npmVersion":"6.13.4","description":"Publish & Subscribe Real-time Messaging with PubNub","directories":{},"_nodeVersion":"12.14.1","dependencies":{"ts-invariant":"^0.4.4"},"_hasShrinkwrap":false,"devDependencies":{"tsdx":"^0.9.0","husky":"^3.0.2","react":"^16.9.0","tslib":"^1.10.0","pubnub":"^4.25.1","prettier":"^1.18.2","react-dom":"^16.9.0","typescript":"^3.5.3","@types/jest":"^24.0.18","@types/react":"^16.8.25","pretty-quick":"^1.11.1","@types/pubnub":"^4.25.1","@types/react-dom":"^16.8.5","@rollup/plugin-replace":"^2.3.0","@testing-library/react":"^9.1.3"},"peerDependencies":{"pubnub":"^4.27.3","@types/pubnub":"^4.25.1"},"_npmOperationalInternal":{"tmp":"tmp/pubnub-react_2.0.0_1581534233605_0.07610119622518696","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"pubnub-react","version":"2.1.0","keywords":["cloud","publish","subscribe","websockets","comet","bosh","xmpp","real-time","messaging"],"author":{"name":"PubNub","email":"support@pubnub.com"},"license":"MIT","_id":"pubnub-react@2.1.0","maintainers":[{"name":"pubnub","email":"stephen@pubnub.com"},{"name":"davidnub","email":"david.lin@pubnub.com"},{"name":"are","email":"me@iama.re"},{"name":"client-engineering-bot","email":"client-engineering@pubnub.com"}],"homepage":"https://github.com/pubnub/react#readme","bugs":{"url":"https://github.com/pubnub/react/issues"},"dist":{"shasum":"8b0f028fc2dbc37925e62fdc35ce34d3e06848ff","tarball":"https://registry.npmjs.org/pubnub-react/-/pubnub-react-2.1.0.tgz","fileCount":19,"integrity":"sha512-enIgKld/ywphi/HXThAPdAhrCU+bNGbzOkKKmBO7vnYFBw2BLiNtRTgU/EcqdMBJqeUJzrHCQj0I3/Yu9yVNMw==","signatures":[{"sig":"MEUCIQCAhFaYQ3kSUjwYe7/nw6DVq1N7Cxsl4G/9ZILiFeIzxAIgNQ0NAuVTx2YQFJDXejYgaMOcpX67wItVWJ/uMa3p7H8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4K7QCRA9TVsSAnZWagAAWhYP/1jB03taCBoaJ6aYfZk/\n040p1x7l41jKVaiBS+HUytZelQ7Y5VC7bSynzshtRXqL73atwEZLue6vYler\nJ8e5JEyYpka9cKh2MNdZe74RbBUmzY+cADIgjkFkjykg7ug8/6pZrxQYrzgY\neVwdyDw9WM7JckTyS0AioN3l+azBYmXRnkgHkS5g1do4lhRlyyCyHKhLUYvV\nRQmEAhWrja7nuLUKCTiglaNGadHZqePYy0HK6W2vkQxG552p24PPR0xe9kF7\n4HrHGGZYv/dpj60I5dPX/N5Hjs8SpYXWZnkAAhc/WlzXiR/AEwz9on3QSQ6A\ns2/DoCr7GFkCClN74xP+0/3N+qr4hzauRaXuqcX0PK/kCgVYHbBMNW9PBrUn\nP6XSl+96mudelvQVYWqdTV34e3Nocg2ucfuJvWy+UsQVSkftaWHE6IGdg2gk\n7jifbxD0TIY9wS4NQvZdWBPbCyC2B2gPTkPxFE3vO6qjd/1pRdTH6HWfTk0K\nS1pjTJezaSpotfSdue4CN3egilSVhcZGs5RuVoVXMcoC/XVwSkptYYimmnH1\nIDyJgTu/UwF05WX6QhNZIcirkosMWlgqIdwIMiOgbQqoWEmPfSIeI1ABVu7J\n04YPh08ttxu/wa8PmsYOcKxs47NfRfwwvRyYQPMITcCELmpWCjRw9dhCduew\nbrFQ\r\n=RSwV\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/**/*.(spec|test).{ts,tsx}"]},"main":"dist/index.js","husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"module":"dist/pubnub-react.esm.js","gitHead":"620d92ef26545b4925408bb1490af8da73103a7c","scripts":{"lint":"tsdx lint","test":"tsdx test --env=jsdom","build":"tsdx build","start":"tsdx watch"},"typings":"dist/index.d.ts","_npmUser":{"name":"client-engineering-bot","email":"client-engineering@pubnub.com"},"prettier":{"semi":true,"printWidth":80,"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git://github.com/pubnub/react.git","type":"git"},"_npmVersion":"7.0.15","description":"Publish & Subscribe Real-time Messaging with PubNub","directories":{},"_nodeVersion":"15.4.0","dependencies":{"ts-invariant":"^0.4.4"},"_hasShrinkwrap":false,"devDependencies":{"tsdx":"^0.9.0","husky":"^3.0.2","react":"^16.9.0","tslib":"^1.10.0","pubnub":"^4.25.1","prettier":"^1.18.2","react-dom":"^16.9.0","typescript":"^3.5.3","@types/jest":"^24.0.18","@types/react":"^16.8.25","pretty-quick":"^1.11.1","@types/pubnub":"^4.25.1","@types/react-dom":"^16.8.5","@rollup/plugin-replace":"^2.3.0","@testing-library/react":"^9.1.3"},"peerDependencies":{"pubnub":"^4.27.3","@types/pubnub":"^4.25.1"},"_npmOperationalInternal":{"tmp":"tmp/pubnub-react_2.1.0_1608560335102_0.012033408809276391","host":"s3://npm-registry-packages"}},"2.1.1":{"name":"pubnub-react","version":"2.1.1","keywords":["cloud","publish","subscribe","websockets","comet","bosh","xmpp","real-time","messaging"],"author":{"name":"PubNub","email":"support@pubnub.com"},"license":"MIT","_id":"pubnub-react@2.1.1","maintainers":[{"name":"pubnub","email":"stephen@pubnub.com"},{"name":"davidnub","email":"david.lin@pubnub.com"},{"name":"are","email":"me@iama.re"},{"name":"client-engineering-bot","email":"client-engineering@pubnub.com"}],"homepage":"https://github.com/pubnub/react#readme","bugs":{"url":"https://github.com/pubnub/react/issues"},"dist":{"shasum":"0382837523dc83fef238bddbd5da5124b2f90b51","tarball":"https://registry.npmjs.org/pubnub-react/-/pubnub-react-2.1.1.tgz","fileCount":19,"integrity":"sha512-0KP+C/hFcL1J0d99B/0tg3fpBW1CPjV2VeVApxu8p5y57c0a4yL/AisvBlBLX+wk3uYXm2+GmdBCF9XatheT3g==","signatures":[{"sig":"MEUCIGhbVUGUY1HFGfWOj86got8F+2Aet/GGXfZ72X8NoS5ZAiEAt349efAXjff4tvbrawwgzVjMUccRo/rWpix62GdO9uM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30574,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnRSWCRA9TVsSAnZWagAAGd8P/2vDMnx1tuAfQ7DXfHoX\nPfsvk6mRRMtuoTEALmw6rL0kGsHjeiycUYyn7iROVctWRUwGoXTgYIWn9MqZ\nfCgbB29YSEBc9zjIwXuU+ln74BKUZ9XTGexA5HGwee2gVgqPDwuG4JpOUvuA\nH3YnTRuQNxG3OusBYTwVSHbUgFbJ4xNsKsHrNNlM6ikMDKw/VhECOpFMYNpJ\ndbk+uyBjqX/LaNI1AbTcL4ODQDorr/SyIfylYxunDjBcNAB4tTEEK5BTD3pv\nL+DkoGpMBYt488lhuQ6LVUgwYnQqXi0Gto5oQcjmDT9HV1gGlWM/2EuuYFEN\nJXBH97mwG4ZpySYU684H8YbYbgsL0rebMs1MzhmkTZFMgtc1eIgo0NGWqEYO\njLBLi8qjcWq3rm7xcxYYo6xdue5MT1THeIP7CjqVbGf+BceNyzYoPheyhKaJ\nu8U4ukUj6j8zujUBYscDzEtzxEAX15EP0y5grVNCXzrWlBdyh2BdXrSPvqpF\nJD0dSJIIUeo+jN/HAhIVtB+pnDqew24+vsHoPSbH34N5xmnqXQTTDVfG2EUh\ndeQhzq/ijt5Uq6DcmeKorv3IpYoaD4oZbvRLzDWkjg+Or7LsupjDjkJEJFgc\nmDHOYPvZAMtk6Zt4RRBK0suEb9pd68DUlfB9sfER8CpKH7bWOebKmULPxba0\nVKTQ\r\n=QHEm\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/**/*.(spec|test).{ts,tsx}"]},"main":"dist/index.js","husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"module":"dist/pubnub-react.esm.js","gitHead":"c342231db0a1a000ec3bf7a029bd4dfd99710b32","scripts":{"lint":"tsdx lint","test":"tsdx test --env=jsdom","build":"tsdx build","start":"tsdx watch"},"typings":"dist/index.d.ts","_npmUser":{"name":"client-engineering-bot","email":"client-engineering@pubnub.com"},"prettier":{"semi":true,"printWidth":80,"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git://github.com/pubnub/react.git","type":"git"},"_npmVersion":"6.14.15","description":"Publish & Subscribe Real-time Messaging with PubNub","directories":{},"_nodeVersion":"14.18.1","dependencies":{"ts-invariant":"^0.4.4"},"_hasShrinkwrap":false,"devDependencies":{"tsdx":"^0.9.0","husky":"^3.0.2","react":"^16.9.0","tslib":"^1.10.0","pubnub":"^4.25.1","prettier":"^1.18.2","react-dom":"^16.9.0","typescript":"^3.5.3","@types/jest":"^24.0.18","@types/react":"^16.8.25","pretty-quick":"^1.11.1","@types/pubnub":"^4.25.1","@types/react-dom":"^16.8.5","@rollup/plugin-replace":"^2.3.0","@testing-library/react":"^9.1.3"},"peerDependencies":{"pubnub":"^4.27.3","@types/pubnub":"^4.25.1"},"_npmOperationalInternal":{"tmp":"tmp/pubnub-react_2.1.1_1637684374429_0.7340975348880354","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"pubnub-react","version":"3.0.0","keywords":["cloud","publish","subscribe","websockets","comet","bosh","xmpp","real-time","messaging"],"author":{"name":"PubNub","email":"support@pubnub.com"},"license":"MIT","_id":"pubnub-react@3.0.0","maintainers":[{"name":"pubnub","email":"stephen@pubnub.com"},{"name":"davidnub","email":"david.lin@pubnub.com"},{"name":"are","email":"me@iama.re"},{"name":"client-engineering-bot","email":"client-engineering@pubnub.com"}],"homepage":"https://github.com/pubnub/react#readme","bugs":{"url":"https://github.com/pubnub/react/issues"},"dist":{"shasum":"b7717d45ad3cc1dc5dde91b530e4ed19848de317","tarball":"https://registry.npmjs.org/pubnub-react/-/pubnub-react-3.0.0.tgz","fileCount":18,"integrity":"sha512-w1kXFZhjtHRhvcDXot5re8IX6zBLn7YdSCz/ETIUIRsXlI9nGt+INBXFz/3TgU/+3OzHOsBHhxENW/+E8LcRmw==","signatures":[{"sig":"MEQCIBRiL+yrzwKbTp7wGdINcbEtqfuB8Jm2NRfd4JgwX28iAiARXjBxisU0uSB/vk0lY0UFb7GyX0p4IyMZ4oeF6D9TDw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29842,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJioNnpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrrRA/8CvE+kixoDCrc5EtV6LGDFDm5tSpgu5bEJWLvn8FlWfxwKEGv\r\nyJq4RhDnML6KbkLIK+pWD9OGam0pbMNq3i9m1Hip5hkApv8EJVmLQEJCN9l8\r\ny/bdk1O9OZnBaktURr+VUG3Ek2WI0RkYWOgw8l5a2xfUBvWNpAlDZh2kQIx1\r\nwfdLVq07urKbwkuplC0RlP5LixttfrCAyuLVz0qYDKtlfAbdQNBf9VwtjTOO\r\nmU5//mi0r+RtEfpAGtAhm2diJbzupsfD/rkL59hdzPO3w8DM2ckOaZTvhNgS\r\nQFSwE/K7r+AROH1rEvGIkJU+Ku6KacIoDIS+g2fswzipcjEn6eLm8f8GV1k9\r\nyLgLiFYL80RG+a+L6FVA3lLJOHbBs/Fsq/RhZ7fj4LrpZfUBsg4MNAOaWA0F\r\nWuKBOf93aXBBPsuaBVzo4H5ZSHMaUhApws+6Et+rBpDKelsW3r9BTr5OSlWp\r\nkR+cS2ZTJpF5NOlzvw5cQ8GjaO+dy+1PuXbFEHgRSjHsI6d/ZUsB+MN66qA7\r\n8VqeJHrlhpmHE34JQS1/NIbLrF5hpQ7YhAyO7eJf3UCzT+frvaWSoZUQGI6H\r\nmDLmaMxqrVQKStFbZo7Mb1z/kF2Fb0un8oA2xLAzRIFh+ofjf++tNoGtCTDs\r\nq7snyrPqAtOaLRi8OCfwuXPLZJrkni5FiRo=\r\n=0lOF\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/**/*.(spec|test).{ts,tsx}"]},"main":"dist/index.js","husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"module":"dist/pubnub-react.esm.js","gitHead":"e5d75b319003a513f7ba7d0f73cfe7d4f489f4ae","scripts":{"lint":"tsdx lint","test":"tsdx test --env=jsdom","build":"tsdx build","start":"tsdx watch"},"typings":"dist/index.d.ts","_npmUser":{"name":"client-engineering-bot","email":"client-engineering@pubnub.com"},"prettier":{"semi":true,"printWidth":80,"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git://github.com/pubnub/react.git","type":"git"},"_npmVersion":"8.5.5","description":"Publish & Subscribe Real-time Messaging with PubNub","directories":{},"_nodeVersion":"16.15.0","dependencies":{"ts-invariant":"^0.4.4"},"_hasShrinkwrap":false,"devDependencies":{"tsdx":"^0.9.0","husky":"^3.0.2","react":"^16.9.0","tslib":"^1.10.0","pubnub":"^7.0.1","prettier":"^1.18.2","react-dom":"^16.9.0","typescript":"^3.5.3","@types/jest":"^24.0.18","@types/react":"^16.8.25","pretty-quick":"^1.11.1","@types/pubnub":"^7.0.0","@types/react-dom":"^16.8.5","@rollup/plugin-replace":"^2.3.0","@testing-library/react":"^9.1.3"},"peerDependencies":{"pubnub":"^7.0.1","@types/pubnub":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pubnub-react_3.0.0_1654708713404_0.9784488676807479","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"pubnub-react","version":"3.0.1","keywords":["cloud","publish","subscribe","websockets","comet","bosh","xmpp","real-time","messaging"],"author":{"name":"PubNub","email":"support@pubnub.com"},"license":"MIT","_id":"pubnub-react@3.0.1","maintainers":[{"name":"pubnub","email":"stephen@pubnub.com"},{"name":"davidnub","email":"david.lin@pubnub.com"},{"name":"are","email":"me@iama.re"},{"name":"client-engineering-bot","email":"client-engineering@pubnub.com"}],"homepage":"https://github.com/pubnub/react#readme","bugs":{"url":"https://github.com/pubnub/react/issues"},"dist":{"shasum":"17cfb46ebcb2b2971121005028cf5f353aeb79ef","tarball":"https://registry.npmjs.org/pubnub-react/-/pubnub-react-3.0.1.tgz","fileCount":15,"integrity":"sha512-rqWJmPGvrTTSYrfSImEDm1kd81ajbJH7MV7m8QDqIZMJeGukrThgZLJeYBqSvnCblCfFJdIaVSLDlddP8uvfkw==","signatures":[{"sig":"MEQCIAaKply47OVm/ir6etAdHZKcCJmPkfdue9GkLf9pfdRPAiAzW5hVwIR88mu52AAG1abdmu77zf8jgdwnQVEq3q9o4g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiu01VACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr3dxAAoaYxFu+i/A6p4GY8tl1VQH4a/hKK3ubhACEp1Rn5QC/CU7KV\r\nW08ESmO0qR5Gk9rBMmtuj4GoLAtS+Vxl83RfdDO/6KrzjrZIfkMIrkfiRIM7\r\ny5p3SJz9he6RCfmGg5f+plgXxuRku7XZ15GWkkTBHfpcXY2/FcrUFBVVLrBo\r\nnsorocQgkHCV9Cxxj1dPpTnxCkwubElcYK/43Rk/EyxvoIhH0ZyT3sU4/XSo\r\nsqFKSUKOsfvCOKOT11PeaRdtop7zhKbKgPrX13NKAh+Z2s9dTsEHdV/fvQ3e\r\nlSRaQ7C/9Enj3LBN+uLT0b1Hx2dTE4kFAnssUYkvv3u0nUxXYMFNez6ovfBf\r\nfeOoUTDR/tSTt+eGoLYi2oG8x4sTuGEyWZ6g49oat/7WjPJBbyI1tHGI+Ldo\r\nuMMtaebh/5ZQEYydkGnLzszfiF4fhgNFGcZhtACEYt3flQoo04pP9jewbYq6\r\nvSBZVVZOGMtCbp16WmfoqSt6MFa0gebZDyoKwCzgy8WSRL4kk39LtbTIfVrM\r\n/OXLF9YFOB60txlR4P/T5b6xF1ytESTYA6Q9j6ZMePT3odTr7oZ0bO0fWPno\r\nAhhORZDUfxCqTuqRQE6/Nd4zgphqGyhHMA+L4d5Q5F9mpA0b93HRDDYAT1c0\r\nktoTiYw9t9ST7eCBKQctVs1fvXHV/N9F8UI=\r\n=oHbe\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/**/*.(spec|test).{ts,tsx}"]},"main":"dist/index.js","husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"module":"dist/pubnub-react.esm.js","gitHead":"77f44760dd4f729c5321630b73f177d1c6e9860e","scripts":{"lint":"tsdx lint","test":"tsdx test --env=jsdom","build":"tsdx build","start":"tsdx watch"},"typings":"dist/index.d.ts","_npmUser":{"name":"client-engineering-bot","email":"client-engineering@pubnub.com"},"prettier":{"semi":true,"printWidth":80,"singleQuote":true,"trailingComma":"es5"},"overrides":{"jest":"^26.0.0","ts-jest":"^26.0.0"},"repository":{"url":"git://github.com/pubnub/react.git","type":"git"},"_npmVersion":"8.11.0","description":"Publish & Subscribe Real-time Messaging with PubNub","directories":{},"sideEffects":false,"_nodeVersion":"16.15.1","dependencies":{"ts-invariant":"^0.4.4"},"_hasShrinkwrap":false,"devDependencies":{"tsdx":"^0.14.1","husky":"^3.0.2","react":"^16.9.0","tslib":"^1.10.0","pubnub":"^7.0.1","prettier":"^1.18.2","react-dom":"^16.9.0","typescript":"^3.8.0","@types/jest":"^26.0.0","@types/react":"^16.8.25","pretty-quick":"^1.11.1","@types/pubnub":"^7.0.0","@types/react-dom":"^16.8.5","@rollup/plugin-replace":"^2.3.0","@testing-library/react":"^9.1.3"},"peerDependencies":{"pubnub":"^7.0.1","@types/pubnub":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pubnub-react_3.0.1_1656442197632_0.250422222268877","host":"s3://npm-registry-packages"}},"3.0.2":{"name":"pubnub-react","version":"3.0.2","keywords":["cloud","publish","subscribe","websockets","comet","bosh","xmpp","real-time","messaging"],"author":{"name":"PubNub","email":"support@pubnub.com"},"license":"MIT","_id":"pubnub-react@3.0.2","maintainers":[{"name":"client-engineering-bot","email":"client-engineering@pubnub.com"},{"name":"stephenlb","email":"blum.stephen@gmail.com"},{"name":"pubnub-admin","email":"stephen@pubnub.com"},{"name":"davidnub","email":"david.lin@pubnub.com"},{"name":"are","email":"me@iama.re"}],"homepage":"https://github.com/pubnub/react#readme","bugs":{"url":"https://github.com/pubnub/react/issues"},"dist":{"shasum":"d29b90b5124d9dbadcd063cf945a56eb9ca2adf1","tarball":"https://registry.npmjs.org/pubnub-react/-/pubnub-react-3.0.2.tgz","fileCount":15,"integrity":"sha512-2SrJtCxw140+bHKuXvEPT/lqTUG6zy4aKkx8KCzDheXC85qnuAj2x2CSRIA+6PnHpoTZAwKsK5BLmoQ+9Av59w==","signatures":[{"sig":"MEUCICGT/vI10RLlTGvAALqaxsDVYGqIrOtNIWP89upe2w5vAiEAx5QEVOsoJootrG2XowHYwc48q34cpXtDsqwS8CrFX1Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30026,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhLl8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp4PxAAl2rbbr0cmyFRUSGBILMVtBWolLLiRKUgRUHE/eo292Y74UzL\r\n89aIk9JnlOwoHYBW30QgY3TIJYYdbZC78dbGpUlYD6Ann5MSe+0QXYD97Lon\r\nfC895CaOwnyyYDoJA3E1BGGFqoJPhvGoTGP78fUhmEzQHFpb1aD4gX4cryTr\r\nPBKyzqHZ9nkuhQ19O5HP1tBijMJA7mUIo363m/L9mQmsgvlY7/oUDPffr21Q\r\n2y8Z4SAZWl0vzFrzypsH3wIKjKStRGGLsVK0j3VwN/Zlff1+DZagZf7wz+xp\r\nQQbD+EyB2ttLjsXEoqGAA5YuhIex8fxC9jQl4/YqWlmmFahK313hooHIoaQQ\r\nchE0SFe5zKBaaT22lPrLRtmXMqSHQ3Snm+RQKdv+a7HNmQCDQo2FVRBiQVYK\r\nXXSI5rVPB1M9JAxZo2prwdHoj4ceZSoa38gepLMv2Hb0Avmra/G+KygppLlF\r\nO9ChlHW+tsGqegBkIACawFtYg0K35wLlfRWuW/6+QN3kZqsf8GP47AvUTmyt\r\n/pjFvOmZAhr5q1j0S5cRlUSVvYW/owBu8lBmKL4NCybAo6qInb+8SIgQUzzh\r\nkpGVuKTvhMJQUaButGdlDZTNGu0akCJ//Tnl1xH0zrPxOAzSHsRSmrtkg2GA\r\nDUYMETfoI++qO+c0vDHwd5FwMAt8pfg2neE=\r\n=0Rec\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/**/*.(spec|test).{ts,tsx}"]},"main":"dist/index.js","husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"module":"dist/pubnub-react.esm.js","gitHead":"06d1be7e4f50b3b335b4044bb14b975531b6d7d1","scripts":{"lint":"tsdx lint","test":"tsdx test --env=jsdom","build":"tsdx build","start":"tsdx watch"},"typings":"dist/index.d.ts","_npmUser":{"name":"client-engineering-bot","email":"client-engineering@pubnub.com"},"prettier":{"semi":true,"printWidth":80,"singleQuote":true,"trailingComma":"es5"},"overrides":{"jest":"^26.0.0","ts-jest":"^26.0.0"},"repository":{"url":"git://github.com/pubnub/react.git","type":"git"},"_npmVersion":"8.19.2","description":"Publish & Subscribe Real-time Messaging with PubNub","directories":{},"sideEffects":false,"_nodeVersion":"16.18.1","dependencies":{"ts-invariant":"^0.10.3"},"_hasShrinkwrap":false,"devDependencies":{"tsdx":"^0.14.1","husky":"^3.0.2","react":"^16.9.0","tslib":"^1.10.0","pubnub":"^7.0.1","prettier":"^1.18.2","react-dom":"^16.9.0","typescript":"^3.8.0","@types/jest":"^26.0.0","@types/react":"^16.8.25","pretty-quick":"^1.11.1","@types/pubnub":"^7.0.0","@types/react-dom":"^16.8.5","@rollup/plugin-replace":"^2.3.0","@testing-library/react":"^9.1.3"},"peerDependencies":{"pubnub":"^7.0.1","@types/pubnub":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pubnub-react_3.0.2_1669642620158_0.37228507004239186","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-08-03T18:45:24.170Z","modified":"2025-12-10T08:51:52.624Z","1.0.0":"2017-08-03T18:45:24.170Z","1.0.1":"2017-08-04T05:51:36.841Z","1.0.2":"2017-09-22T16:51:51.703Z","1.1.0":"2017-11-06T16:14:46.538Z","1.1.1":"2017-11-15T03:36:42.274Z","1.2.0":"2017-11-27T16:28:47.871Z","1.3.1":"2019-06-14T23:21:09.255Z","2.0.0-beta.1":"2019-09-10T01:18:42.171Z","2.0.0-beta.2":"2019-09-10T23:59:23.649Z","2.0.0-beta.3":"2019-09-11T00:08:44.811Z","2.0.0-beta.4":"2019-09-11T00:11:11.309Z","1.3.2":"2019-09-11T00:32:30.701Z","2.0.0-rc.0":"2020-02-10T13:55:55.397Z","2.0.0":"2020-02-12T19:03:53.685Z","2.1.0":"2020-12-21T14:18:55.297Z","2.1.1":"2021-11-23T16:19:34.633Z","3.0.0":"2022-06-08T17:18:33.637Z","3.0.1":"2022-06-28T18:49:57.778Z","3.0.2":"2022-11-28T13:37:00.322Z"},"bugs":{"url":"https://github.com/pubnub/react/issues"},"author":{"name":"PubNub","email":"support@pubnub.com"},"license":"MIT","homepage":"https://github.com/pubnub/react#readme","keywords":["cloud","publish","subscribe","websockets","comet","bosh","xmpp","real-time","messaging"],"repository":{"url":"git://github.com/pubnub/react.git","type":"git"},"description":"Publish & Subscribe Real-time Messaging with PubNub","maintainers":[{"email":"stephen@pubnub.com","name":"pubnub-admin"},{"email":"blum.stephen@gmail.com","name":"stephenlb"},{"email":"client-engineering@pubnub.com","name":"client-engineering-bot"},{"email":"przemyslaw.janowski@pubnub.com","name":"pjanowski-pn"},{"email":"david.lin@pubnub.com","name":"davidnub"},{"email":"me@iama.re","name":"are"}],"readme":"# PubNub React Framework\n\nThis is the official PubNub React framework repository.\n\nPubNub takes care of the infrastructure and APIs needed for the realtime communication layer of your application. Work on your app's logic and let PubNub handle sending and receiving data across the world in less than 100ms.\n\n* [Requirements](#requirements)\n* [Get keys](#get-keys)\n* [Sample app](#sample-app)\n* [Documentation links](#documentation-links)\n* [Reference information](#reference-information)\n* [Support](#support)\n\n## Requirements\n\nTo use the PubNub React framework, you need:\n\n* React 16.8 or above\n* PubNub [Javascript SDK](https://www.pubnub.com/docs/web-javascript/pubnub-javascript-sdk).\n\n> This library is compatible with the latest versions of the React Native framework. For examples, refer to [examples/reactnative](/examples/reactnative).\n\n## Get keys\n\nYou will need publish and subscribe keys to authenticate your app. Get your keys from the [Admin Portal](https://dashboard.pubnub.com/).\n\n## Sample app\n\nFollow these instructions to set up a simple chat app using PubNub.\n\n**Note**: These instructions assume you're using JavaScript. If you'd prefer to use TypeScript, follow the instructions in the [React framework documentation](https://www.pubnub.com/docs/chat/react/getting-started).\n\n1. Set up your React project.\n\n    For a quick single-page app, [create-react-app](https://reactjs.org/docs/create-a-new-react-app.html#create-react-app) is a good starting point:\n\n    ```bash\n    npx create-react-app react-sample-chat\n    ```\n\n1. Add the PubNub JavaScript SDK and React framework packages to your project:\n\n    ```bash\n    cd react-sample-chat\n    npm install --save pubnub pubnub-react\n    ```\n\n1. Replace the contents of `src/App.js` with the following, replacing `myPublishKey` and `mySubscribeKey` with your own keys, and `myUniqueUUID` with a value of your choice:\n\n    ```jsx\n    import React, { useState, useEffect } from 'react';\n    import PubNub from 'pubnub';\n    import { PubNubProvider, usePubNub } from 'pubnub-react';\n\n    const pubnub = new PubNub({\n      publishKey: 'myPublishKey',\n      subscribeKey: 'mySubscribeKey',\n      uuid: 'myUniqueUUID'\n    });\n\n    function App() {\n      return (\n        <PubNubProvider client={pubnub}>\n          <Chat />\n        </PubNubProvider>\n      );\n    }\n\n    function Chat() {\n      const pubnub = usePubNub();\n      const [channels] = useState(['awesome-channel']);\n      const [messages, addMessage] = useState([]);\n      const [message, setMessage] = useState('');\n\n      const handleMessage = event => {\n        const message = event.message;\n        if (typeof message === 'string' || message.hasOwnProperty('text')) {\n          const text = message.text || message;\n          addMessage(messages => [...messages, text]);\n        }\n      };\n\n      const sendMessage = message => {\n        if (message) {\n          pubnub\n            .publish({ channel: channels[0], message })\n            .then(() => setMessage(''));\n        }\n      };\n\n      useEffect(() => {\n        pubnub.addListener({ message: handleMessage });\n        pubnub.subscribe({ channels });\n      }, [pubnub, channels]);\n\n      return (\n        <div style={pageStyles}>\n          <div style={chatStyles}>\n            <div style={headerStyles}>React Chat Example</div>\n            <div style={listStyles}>\n              {messages.map((message, index) => {\n                return (\n                  <div key={`message-${index}`} style={messageStyles}>\n                    {message}\n                  </div>\n                );\n              })}\n            </div>\n            <div style={footerStyles}>\n              <input\n                type=\"text\"\n                style={inputStyles}\n                placeholder=\"Type your message\"\n                value={message}\n                onKeyPress={e => {\n                  if (e.key !== 'Enter') return;\n                  sendMessage(message);\n                }}\n                onChange={e => setMessage(e.target.value)}\n              />\n              <button\n                style={buttonStyles}\n                onClick={e => {\n                  e.preventDefault();\n                  sendMessage(message);\n                }}\n              >\n                Send Message\n              </button>\n            </div>\n          </div>\n        </div>\n      );\n    }\n\n    const pageStyles = {\n      alignItems: 'center',\n      background: '#282c34',\n      display: 'flex',\n      justifyContent: 'center',\n      minHeight: '100vh',\n    };\n\n    const chatStyles = {\n      display: 'flex',\n      flexDirection: 'column',\n      height: '50vh',\n      width: '50%',\n    };\n\n    const headerStyles = {\n      background: '#323742',\n      color: 'white',\n      fontSize: '1.4rem',\n      padding: '10px 15px',\n    };\n\n    const listStyles = {\n      alignItems: 'flex-start',\n      backgroundColor: 'white',\n      display: 'flex',\n      flexDirection: 'column',\n      flexGrow: 1,\n      overflow: 'auto',\n      padding: '10px',\n    };\n\n    const messageStyles = {\n      backgroundColor: '#eee',\n      borderRadius: '5px',\n      color: '#333',\n      fontSize: '1.1rem',\n      margin: '5px',\n      padding: '8px 15px',\n    };\n\n    const footerStyles = {\n      display: 'flex',\n    };\n\n    const inputStyles = {\n      flexGrow: 1,\n      fontSize: '1.1rem',\n      padding: '10px 15px',\n    };\n\n    const buttonStyles = {\n      fontSize: '1.1rem',\n      padding: '10px 15px',\n    };\n\n    export default App;\n    ```\n\n1. In your project, run the following command:\n\n    ```bash\n    npm start\n    ```\n\n    You should see the following in your browser:\n    ![chat UI screenshot](./assets/quickstart-screenshot.png)\n\n### Add listeners\n\nIn the code in the previous section, the following adds a message listener in the `Chat()` function:\n\n```javascript\n      useEffect(() => {\n        pubnub.addListener({ message: handleMessage });\n        pubnub.subscribe({ channels });\n      }, [pubnub, channels]);\n```\n\n### Publish and subscribe\n\nPublishing a message:\n\n```javascript\nconst [channels] = useState(['awesome-channel']);\n\n// ...\n\nconst sendMessage = message => {\n  if (message) {\n    pubnub\n      .publish({ channel: channels[0], message })\n      .then(() => setMessage(''));\n  }\n};\n```\n\nSubscribing to a channel:\n\n```javascript\nconst [channels] = useState(['awesome-channel']);\n\n// ...\n\nuseEffect(() => {\n  pubnub.addListener({ message: handleMessage });\n  pubnub.subscribe({ channels });\n}, [pubnub, channels]);\n```\n\n## Documentation links\n\n* [React framework documentation](https://www.pubnub.com/docs/chat/react/setup)\n* [JavaScript SDK documentation](https://www.pubnub.com/docs/web-javascript/pubnub-javascript-sdk)\n* [PubNub React/Redux team chat app](https://pubnub.github.io/typescript-ref-app-team-chat/docs/introduction)\n\n## Reference information\n\n* [PubNubConsumer](#pubnubconsumer)\n* [PubNubProvider](#pubnubprovider)\n* [usePubNub hook](#usepubnub-hook)\n\n### PubNubProvider\n\nThe PubNubProvider makes available a PubNub client instance to a React component tree. You instantiate the provider as follows (note that this example assumes that your publish and subscribe keys are contained in the `pubnub.config.json` file):\n\n```js\nimport PubNub from 'pubnub';\nimport { PubNubProvider } from 'pubnub-react';\n\nconst pubNubConfig = require('./pubnub.config.json');\nconst pubNubClient = new PubNub(pubNubConfig.Demo.keySet);\n\nconst App = () => {\n  return (\n    <PubNubProvider client={pubNubClient}>\n      <MyRootComponent />\n    </PubNubProvider>\n  );\n};\n\nexport default App;\n```\n\n#### PubNubProvider props\n\nThe PubNubProvider component takes a single prop:\n\n* **client** is the required pubNubClient instance. This is used by all components that require PubNub functionality.\n\n### usePubNub hook\n\nThe PubNub hook lets you interact with PubNub in function components.\n\nHooks are a new feature added in React 16.8 that allow you to use React features without writing a class. For a general overview of hooks, refer to [the React documentation](https://reactjs.org/docs/hooks-intro.html).\n\n\n#### Example `usePubNub` hook usage\n\n```javascript\nimport React, { useState, useEffect } from 'react';\nimport { usePubNub } from '../../src/index';\n\nconst PubNubTime = () => {\n  const client = usePubNub();\n  const [time, setTime] = useState(null);\n  const [error, setError] = useState(error);\n\n  useEffect(() => {\n    client\n      .time()\n      .then(({ timetoken }) => {\n        setTime(timetoken);\n      })\n      .catch(error => {\n        setError(error);\n      });\n  }, []);\n\n  if (error !== null) {\n    return <div>An error has occured: {error.message}</div>;\n  }\n\n  if (time === null) {\n    return <div>Loading...</div>;\n  }\n\n  return <div>Current time: {time}</div>;\n};\n\nexport default PubNubTime;\n```\n\nThen, to load `PubNubTime` on-demand, you could use `React.Lazy` and `Suspense`:\n\n```javascript\nimport React, { Suspense, lazy } from 'react';\n\nconst MyRootComponent = () => {\n  const DisplayPubNubTime = lazy(() => import('./PubNubTime'));\n\n  return (\n    <Suspense fallback={<div>Loading. . .</div>}>\n      <DisplayPubNubTime />\n    </Suspense>\n  );\n};\n\nexport default MyRootComponent;\n```\n\n### PubNubConsumer\n\nThe PubNubConsumer allows you to access the client instance you made available with a PubNubProvider.\n\n> **Note**: Be careful, as the children function will be called every time component rerenders. Wrap components using PubNubConsumer using `React.memo` to prevent this behaviour.\n\n#### PubNubConsumer props\n\nThe PubNubConsumer component takes a single prop:\n\n* **client** is the required PubNub Client instance. This is used by all components that require PubNub functionality.\n\n#### Example PubNubConsumer usage\n\nOnce you've created a PubNubProvider, you can access the client with a PubNubConsumer.\n\n```js\nimport React from 'react';\nimport PubNub from 'pubnub';\nimport { PubNubProvider } from '../PubNubProvider';\nimport { PubNubConsumer } from '../PubNubConsumer';\nimport { getPubNubContext } from '../PubNubContext';\n\nconst pubNubConfig = require('../config/pubnub.json');\nconst pubNubClient = new PubNub(pubNubConfig.Demo.keySet);\n\nconst App = () => {\n  return (\n    <PubNubProvider client={pubNubClient}>\n      <PubNubConsumer>\n        {client => 'success!' /* do something now */}\n      </PubNubConsumer>\n    </PubNubProvider>\n  );\n};\n```\n\n## Support\n\nIf you **need help** or have a **general question**, contact support@pubnub.com.\n","readmeFilename":"README.md"}