Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{platformPermissions.map(permission => {
const status = this.state.statuses[permission];
return (
{
RNPermissions.request(permission).then(status => {
this.setState(prevState => ({
...prevState,
statuses: {
...prevState.statuses,
[permission]: status,
},
}));
});
}}
>
{platformPermissions.map(permission => {
const status = this.state.statuses[permission];
return (
{
RNPermissions.request(permission).then(status => {
this.setState(prevState => ({
...prevState,
statuses: {
...prevState.statuses,
[permission]: status,
},
}));
});
}}
>