-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
We have a bunch of react warnings #12877
Comments
This fixes a common React warning we see. Most of these components should be using constructors instead, however componentDidMount is just as good (and doesn't require converting most of these). Conversion to classes will be done in a later stage of React warning fixes. For element-hq/element-web#12877
This fixes a common React warning we see. Most of these components should be using constructors instead, however componentDidMount is just as good (and doesn't require converting most of these). Conversion to classes will be done in a later stage of React warning fixes. For element-hq/element-web#12877
These TODO comments are expected to be fixed ASAP, but until that happens let's minimize the errors in the console for development. For element-hq/element-web#12877 These all aren't using componentDidMount because they do something which causes application instability if componentDidMount were used. Much of these calls are expected to move into constructors once they are converted to real classes.
Some we can't fix:
Some which are harder to fix:
|
For element-hq/element-web#12877 Original error: ``` Warning: Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate. Check the render method of PersistedElement. in PersistedElement (created by AppTile) in div (created by AppTile) in div (created by AppTile) in AppTile (created by AppsDrawer) in div (created by AppsDrawer) in div (created by AppsDrawer) in AppsDrawer (created by AuxPanel) in div (created by AutoHideScrollbar) in AutoHideScrollbar (created by AuxPanel) in AuxPanel (created by RoomView) in div (created by RoomView) in div (created by MainSplit) in MainSplit (created by RoomView) in ErrorBoundary (created by RoomView) in main (created by RoomView) in RoomView (created by LoggedInView) in div (created by LoggedInView) in DragDropContext (created by LoggedInView) in div (created by LoggedInView) in LoggedInView (created by MatrixChat) in ErrorBoundary (created by MatrixChat) in MatrixChat ```
We've silenced all the warnings we can (and that we know of), but there's still a bunch of conversion work to be done here. We need to remove/replace all the UNSAFE_componentWillDoSomething calls with their updated lifecycle, but this is difficult because it can introduce major regressions/crashes in the app. In the interest of time, we're deprioritizing this for now. Once we get closer to a React major version bump, we can pick this up. |
This fixes a common React warning we see. Most of these components should be using constructors instead, however componentDidMount is just as good (and doesn't require converting most of these). Conversion to classes will be done in a later stage of React warning fixes. For element-hq/element-web#12877
The remainder of this is basically #15066 |
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
fix it
The text was updated successfully, but these errors were encountered: