maxs15 / maxs15/react-native-modalbox
ModalBox should not mutate state directly
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.9k
- Forks
- 496
- PR merge metrics
- No merged PRs in 30d
Description
ModalBox directly mutates state in some places which causes corner case timing bugs. There are situations where the modal should remain closed but suddenly opens by itself. This tends to happen in more complex scenarios where state is changing numerous times in various orders and frequencies.
[React docs](https://facebook.github.io/react/docs/react-component.html#instance-properties) say
`Never mutate this.state directly, as calling setState() afterwards may replace the mutation you made. Treat this.state as if it were immutable.
`
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the ModalBox component and inspect the places where its state is mutated directly, using the React guidance linked in the issue as the starting point. Confirm that state changes no longer cause the modal to open unexpectedly during complex sequences, and check the relevant existing behavior before considering the issue done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100