GeekyAnts / GeekyAnts/NativeBase

HybridProvider useEffect memory leak

Open
#5,542 5 comments 0 reactions 0 assignees View on GitHub
bug triage v3
Dominant language
TypeScript
Stars
20.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

### Description

useEffect in HybridProvider causing a memory leak when closing app.

### CodeSandbox/Snack link

private project

### Steps to reproduce

1. Open app
2. Close it
3. Error appears in Metro

> ERROR Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
> in HybridProvider (at NativeBaseProvider.tsx:90)

### NativeBase Version

3.4.5
3.4.21
3.4.22
3.4.23

### Platform

- [X] Android
- [ ] CRA
- [ ] Expo
- [X] iOS
- [ ] Next

### Other Platform

_No response_

### Additional Information

Our project is using RN 0.68.2. This issue is related with #5539. Both errors and warning point to the same HybridProvider.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.