GeekyAnts / GeekyAnts/NativeBase
Radio group doesn't read correct state
- Dominant language
- TypeScript
- Stars
- 20.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
Radio.Group onChange event doesn't have correct values of previous state, instead is has the initial state of the variable we're using. So deconstructing an object will result an override of the latest state of the variable
### CodeSandbox/Snack link
https://snack.expo.dev/dQWI2wSVm
### Steps to reproduce
1) create multiple FormControl in one screen
2) Create a Radio.Group inside FormControl
3) const [data, setData] = useState({});
4) update other Input's values like shown in docs
5) update Radio.Group value like shown in docs
6) Notice that the state of data variable has reset to initial value and upon updating it only has RadioGroup value
### NativeBase Version
3.3.x
### Platform
- [X] Android
- [ ] CRA
- [ ] Expo
- [X] iOS
- [ ] Next
### Other Platform
_No response_
### Additional Information
Happens on 3.4.x
Contributor guide
Assessment
This issue has not been assessed yet.