-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update React Native code formatting #61
Conversation
@@ -0,0 +1,3 @@ | |||
{ | |||
"tabWidth": 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added this as sometimes vscode does not use prettier formatter if config file is missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rename was required, as right now this files are visible as separate documentation: https://docs.fishjam.io/react-native/components/configure-permissions
docs/react-native/connecting.mdx
Outdated
const { joinRoom } = useConnection(); | ||
|
||
const onPressJoin = useCallback(async () => { | ||
const { fishjamUrl, peerToken } = yourFunction(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion:
const { fishjamUrl, peerToken } = yourFunction(); | |
// retrieve the credentials from your backend | |
const { fishjamUrl, peerToken } = yourFunction(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've implemented function to get data from sandbox as an example
docs/react-native/quick-setup.mdx
Outdated
import { Button } from "react-native"; | ||
import { useCamera, useConnection } from "@fishjam-cloud/react-native-client"; | ||
|
||
export function StartStreamingButton({ | ||
roomName, | ||
userName, | ||
}: { | ||
roomName: string; | ||
userName: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
praise: Maybe we should change to peerName
here instead of using userName
everywhere. I think the peer
word is established in our nomenclature. I think user
for us means the developer using our services.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated everywhere
docs/react-native/quick-setup.mdx
Outdated
@@ -231,7 +230,7 @@ export default function HomeScreen() { | |||
return ( | |||
<SafeAreaView style={styles.container}> | |||
{connectionStatus !== "connected" && ( | |||
<StartStreamingButton roomName="*roomName*" userName="*username*" /> | |||
<StartStreamingButton roomName="Room Name" userName="User Name" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
praise:
<StartStreamingButton roomName="Room Name" userName="User Name" /> | |
<StartStreamingButton roomName="Room Name" peerName="Peer Name" /> |
.prettierignore
Outdated
node_modules/* | ||
.yarn/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New line at the end, pretty please 🥺
@@ -62,3 +62,4 @@ se | |||
InstallPackage | |||
ConfigurePermissions | |||
mdx | |||
_components |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
praise: ❤️
Description
Various RN documentation tweaks:
This is how updated example will look like: