-
Notifications
You must be signed in to change notification settings - Fork 5
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
Switching between desktop and mobile layout causes you to leave chat #594
Comments
Hmmm. Thinking about this, I think the two main options are:
The latter seems...super finicky and not very resilient. I think the former is more viable but will probably mean a decent amount of prop/ref drilling and careful review of the lifecycle management of the call section. On the upside, it might make the layout effect hooks for scrolling chat flow more obviously. |
This might be a good opportunity to look into persisting call state across code pushes/reloads as well, since I remember that being a source of confusion. I had my eye on something like meteor/react-packages#333 for this, and plausibly it would give us an easier way to plumb that state through as well, although sadly it doesn't seem like that specific PR is ever going to land. |
So, that approach might work for some things, but I believe it will not work for anything in an actual production setting, because the mechanism that powers Meteor's For developer tooling, I think the existing As another point in design space for avoiding data loss during Meteor reload: Sandstorm had a scheme where if you had any grains open at the time, it'd inhibit |
This replaces the hierarchy of components that managed our WebRTC interactions with a new `useCallState` hook which encapsulates all of the call state management functionality. This provides a key benefit: we can hoist the actual state storage higher in the component tree, which means that we won't lose call state when switching layouts between desktop and mobile screen widths. As a bonus, this change also corrects a bunch of things from the audio calls implementation that would have gone awry under `StrictMode` in React 18 due to doing side-effectful actions outside of `useEffect` blocks. Fixes #594.
This replaces the hierarchy of components that managed our WebRTC interactions with a new `useCallState` hook which encapsulates all of the call state management functionality. This provides a key benefit: we can hoist the actual state storage higher in the component tree, which means that we won't lose call state when switching layouts between desktop and mobile screen widths. As a bonus, this change also corrects a bunch of things from the audio calls implementation that would have gone awry under `StrictMode` in React 18 due to doing side-effectful actions outside of `useEffect` blocks. Fixes #594.
This replaces the hierarchy of components that managed our WebRTC interactions with a new `useCallState` hook which encapsulates all of the call state management functionality. This provides a key benefit: we can hoist the actual state storage higher in the component tree, which means that we won't lose call state when switching layouts between desktop and mobile screen widths. As a bonus, this change also corrects a bunch of things from the audio calls implementation that would have gone awry under `StrictMode` in React 18 due to doing side-effectful actions outside of `useEffect` blocks. Fixes #594.
This replaces the hierarchy of components that managed our WebRTC interactions with a new `useCallState` hook which encapsulates all of the call state management functionality. This provides a key benefit: we can hoist the actual state storage higher in the component tree, which means that we won't lose call state when switching layouts between desktop and mobile screen widths. As a bonus, this change also corrects a bunch of things from the audio calls implementation that would have gone awry under `StrictMode` in React 18 due to doing side-effectful actions outside of `useEffect` blocks. Fixes #594.
This replaces the hierarchy of components that managed our WebRTC interactions with a new `useCallState` hook which encapsulates all of the call state management functionality. This provides a key benefit: we can hoist the actual state storage higher in the component tree, which means that we won't lose call state when switching layouts between desktop and mobile screen widths. As a bonus, this change also corrects a bunch of things from the audio calls implementation that would have gone awry under `StrictMode` in React 18 due to doing side-effectful actions outside of `useEffect` blocks. Fixes #594.
This is of course because the CallSection component gets unmounted/remounted without carrying state across, but we should see if we can do better.
The text was updated successfully, but these errors were encountered: