From 27186b48232763a2e30a379252e5bb75c5138d56 Mon Sep 17 00:00:00 2001 From: valorant-dhruv <20dit021@charusat.edu.in> Date: Thu, 21 Nov 2024 17:22:27 -0500 Subject: [PATCH] partykit function update --- docs/connect.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/connect.md b/docs/connect.md index 2bd5edd..b3ba224 100644 --- a/docs/connect.md +++ b/docs/connect.md @@ -44,14 +44,14 @@ If you haven't added PartyKit to your app, run the PartyKit CLI: npx partykit init ``` -Finally, connect to the party in your client code: +Finally, connect to the party in your client code. Note that the connect function takes three arguments, the current ledger, the remote ledger name, and the host of your PartyKit server.: ```js import { useFireproof } from 'use-fireproof' import { connect } from '@fireproof/partykit' const { ledger } = useFireproof('my-app-ledger-name') -const connection = connect.partykit(ledger, process.env.PUBLIC_PARTYKIT_HOST!) +const connection = connect(ledger,'', process.env.PUBLIC_PARTYKIT_HOST!) ``` The end result is that your app will sync data with all users connected to the party. Perfect for collaboration, or for sharing data between a user's devices. Take a look at the full instructions in the [PartyKit connector docs](https://www.npmjs.com/package/@fireproof/partykit).