From f3947fa375e74c7ca1f0e6ff15d84bfd66608b06 Mon Sep 17 00:00:00 2001 From: Nik Graf Date: Wed, 26 Jun 2024 05:54:37 +0200 Subject: [PATCH] improve infering the return type --- examples/app/src/components/Settings.tsx | 2 +- examples/app/src/components/Todos.tsx | 4 ++-- packages/react-yjs/src/useY.ts | 19 ++++++++++++------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/examples/app/src/components/Settings.tsx b/examples/app/src/components/Settings.tsx index 2b765b1..58a216b 100644 --- a/examples/app/src/components/Settings.tsx +++ b/examples/app/src/components/Settings.tsx @@ -7,7 +7,7 @@ export const Settings: React.FC = () => { // initialize a Y.Doc and get the settings // when the component mounts const yDoc = new Y.Doc(); - const ySettings = yDoc.getMap("settings"); + const ySettings = yDoc.getMap("settings"); ySettings.set("weeklyReminderEmail", true); return ySettings; }); diff --git a/examples/app/src/components/Todos.tsx b/examples/app/src/components/Todos.tsx index 8749d49..ceb228d 100644 --- a/examples/app/src/components/Todos.tsx +++ b/examples/app/src/components/Todos.tsx @@ -43,7 +43,7 @@ export const Todos: React.FC = () => {