-
Notifications
You must be signed in to change notification settings - Fork 24
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
docs(react-native): Advanced: Chat Integration - Chat in Video #854
docs(react-native): Advanced: Chat Integration - Chat in Video #854
Conversation
packages/react-native-sdk/docusaurus/docs/reactnative/06-advanced/02-chat-with-video.mdx
Outdated
Show resolved
Hide resolved
packages/react-native-sdk/docusaurus/docs/reactnative/06-advanced/02-chat-with-video.mdx
Show resolved
Hide resolved
packages/react-native-sdk/docusaurus/docs/reactnative/06-advanced/02-chat-with-video.mdx
Outdated
Show resolved
Hide resolved
}, [client, cid]); | ||
|
||
useEffect(() => { | ||
if (!client || !channelWatched) { |
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 dont see the use case of channelWatched prop actually..
if the channel is not watched, it wont be inside activeChannels and so handleevent will set a count of 0.
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.
It is just a security check to avoid bugs if the channel is not watched. Good to have it for now I think
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.
no please, lets make it simpler
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.
just a security check to avoid bugs if the channel is not watched.
we an add a note for that.. lets strive to make it simpler
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.
Removed the hook
packages/react-native-sdk/docusaurus/docs/reactnative/06-advanced/02-chat-with-video.mdx
Outdated
Show resolved
Hide resolved
const newChannel = await client.channel(CHANNEL_TYPE, CHANNEL_ID); | ||
setChannel(newChannel); |
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.
cant we just watch here instead of useChannelWatch
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 simplifies it
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.
also why await here?
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.
and there is no need to create the channel ?
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.
client.channel creates a channel automatically if not created. We created the channel already in the ChatScreen
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.
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.
@khushal87 you have linked, but please read the link
we must call channel.create()
or channel.watch()
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.
Resolved since we call channel.watch()
, we discussed yesterday.
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.
please read the comments
import { VideoCallUI } from './components/VideoCallUI'; | ||
import { ChatWrapper } from './src/components/ChatWrapper'; |
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.
import { VideoCallUI } from './components/VideoCallUI'; | |
import { ChatWrapper } from './src/components/ChatWrapper'; | |
import { VideoCallUI } from 'src/components/VideoCallUI'; | |
import { ChatWrapper } from 'src/components/ChatWrapper'; |
Kudos, SonarCloud Quality Gate passed! |
No description provided.