Details
Flow
Diff Detail
- Repository
- rCOMM Comm
- Branch
- ashoat/react-navigation-drawer
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
I referenced the TypeScript types when writing this diff.
You only need to review the drawer libdef, as the others are copy-pasted from there.
native/flow-typed/npm/@react-navigation/drawer_v6.x.x.js | ||
---|---|---|
745 | This was changed in React Nav 6 | |
1974–2004 |
| |
1994–1995 | These were removed in React Nav 6 | |
2005 | New property here in React Nav 6, details here | |
2045–2058 | These were migrated to options in React Nav 6 | |
2069 | React Nav 6 removes this | |
2069 | TypeScript types only have these three props. Upgrade notes only mention removing one prop, so the others were probably removed earlier and the libdef is probably just out of date | |
2071 | New property here in React Nav 6, details here | |
2073–2086 | Most of these props were moved to options at some point – you can see them in the TypeScript types. React Nav 6 upgrade docs don't mention this, so presumably the change occurred earlier | |
2082 | React Nav 6 moves this to options | |
2297 | This was changed in React Nav 6 |
We definitely should return something from this lambda since otherwise it is useless to assign it to variable.
If we find that we don't have permissions then just calling await this.requestAndroidNotificationsPermission(); would result in a prompt asking for notifications permissions. However if the user grants those permissions then hasPermissions is still falsy (since promise returned nothing), so deviceToken will be set to null. Nevertheless permissions are actually granted byt the OS, so the state on the device and keyserver would heal itself on next render.
This differential fixes this case so that if user grants permissions correct state is achieved immediately without need for additional re-render to heal the state.