Skip to content

UNSAFE_componentWillReceiveProps errors in strict mode #316

@mfairley

Description

@mfairley

The library produces error logs in React Strict Mode due to https://github.com/livekit/client-sdk-react-native/blob/main/src/components/ViewPortDetector.tsx#L103

Any plans to fix this?

 ERROR  Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state

Please update the following components: %s ViewPortDetector 

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions