Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FCE-890] Update documentation to use new useConnection hook #54

Merged
merged 4 commits into from
Nov 25, 2024

Conversation

maksg
Copy link
Contributor

@maksg maksg commented Nov 20, 2024

Description

Changed usePeerStatus and useReconnection to useConnection.

Copy link

linear bot commented Nov 20, 2024

Copy link
Contributor

@MiloszFilimowski MiloszFilimowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mironiasty
Copy link
Member

I think we should also update joinRoom/leaveRoom docs, to show that these methods are part of useConnection hook.

@maksg
Copy link
Contributor Author

maksg commented Nov 22, 2024

@mironiasty @MiloszFilimowski I have updated the docs for joinRoom and leaveRoom

@@ -46,7 +46,8 @@ follow our [server setup instructions](/production/server).
In order to connect, you just need to call `joinRoom` method with data from previous step:

```ts
import { joinRoom } from "@fishjam-cloud/react-native-client";
import { useConnection } from "@fishjam-cloud/react-native-client";
const { joinRoom } = useConnection();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: Can you add a new line after the import? 🙏

@@ -56,7 +57,8 @@ await joinRoom(fishjamUrl, peerToken);
In order to close connection, you have to call `leaveRoom` method.

```ts
import { leaveRoom } from "@fishjam-cloud/react-native-client";
import { useConnection } from "@fishjam-cloud/react-native-client";
const { leaveRoom } = useConnection();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: Same request 🙏

@maksg
Copy link
Contributor Author

maksg commented Nov 22, 2024

@MiloszFilimowski Done!

@maksg maksg merged commit 81a6a55 into main Nov 25, 2024
1 check passed
@maksg maksg deleted the maksg/FCE-890-use-connection branch November 25, 2024 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants