/** * A generic effect for getting and setting state dynamically from a Router pubsub channel. * * @param {string} topic The pubsub topic (i.e. channel) to subscribe * @param {object} initialMessage The initial state (defaults to empty object) * @returns [object, function] The current state of the pubsub channel (or initialMessage if no state exists). * The second returned array parameter is a publish function which can be used to update state. * * @example * // Inside a React functional component * const [currentState, publish] = usePubSub("topic", {}); * console.log(currentState); * * onClick = () => { * publish(someNewState); * } */ declare function usePubSub(topic: string, initialMessage?: object): [{ [key: string]: any; }, Function]; export { usePubSub }; //# sourceMappingURL=usePubSub.d.ts.map