From bc0b6c5c5c644d6a97b6629cdfc205c64447bfdd Mon Sep 17 00:00:00 2001 From: Sasha Date: Tue, 21 Feb 2023 22:18:51 +0100 Subject: [PATCH] make ephemeral default to false --- src/useContentPair.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/useContentPair.ts b/src/useContentPair.ts index 835bd48..9d683e4 100644 --- a/src/useContentPair.ts +++ b/src/useContentPair.ts @@ -10,12 +10,12 @@ type ContentPair = { /** * Creates Encoder / Decoder pair for a given contentTopic. * @param {string} contentTopic - topic to orient to - * @param {boolean} ephemeral - optional, makes messages ephemeral + * @param {boolean} ephemeral - makes messages ephemeral, default to false * @returns {Object} Encoder / Decoder pair */ export const useContentPair = ( contentTopic: string, - ephemeral?: boolean, + ephemeral: boolean = false, ): ContentPair => { const [encoder, setEncoder] = React.useState(); const [decoder, setDecoder] = React.useState();