# react-native-nfc-suppress

> suppress nfc

Latest version **0.1.6** (published 2022-11-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-nfc-suppress
pnpm add react-native-nfc-suppress
yarn add react-native-nfc-suppress
bun add react-native-nfc-suppress
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.6 |
| Published | 2022-11-03 |
| First published | 2022-03-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 187.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | gothfrid |
| Maintainers | gothfrid |
| Keywords | react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/react-native-nfc-suppress
- Repository: https://github.com/Gothfrid/react-native-nfc-suppress
- Homepage: https://github.com/Gothfrid/react-native-nfc-suppress#readme
- Issues: https://github.com/Gothfrid/react-native-nfc-suppress/issues
- npm.io page: https://npm.io/package/react-native-nfc-suppress

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.1.6 (latest) — 2022-11-03
- 0.1.4 — 2022-03-10
- 0.1.3 — 2022-03-10
- 0.1.2 — 2022-03-10
- 0.1.1 — 2022-03-05

## README

# react-native-nfc-suppress

Allow disabling of Google pay and Apple pay if needed.

Contributions are welcome!

## Installation

```sh
npm install react-native-nfc-suppress
```

#### Android

Update **AndroidManifest.xml**

```sh
<uses-permission android:name="android.permission.NFC" />
```

#### iOS

This library use native-modules, so you will need to do pod install for iOS:

```sh
cd ios && pod install && cd ..
```

## Usage

```sh
import React from 'react';

import {
  View,
  Text,
  Button,
} from 'react-native';

import { useNfcSuppressor } from 'react-native-nfc-suppress';

export const ExampleComponent= () => {
  const { suppressed, supported, enabled, enable, disable } = useNfcSuppressor();
  
  const switchSuppression = (): void => {
    if (suppressed) {
      disable();
    } else {
      enable();
    }
  };

  return (
    <View style={{display:'flex', flexDirection:'column'}}>
      <Text>{`Is NFC enabled: ${supported}`}</Text>
      <Text>{`Is NFC enabled: ${enabled}`}</Text>
      <Text>{`Is enabled: ${suppressed}`}</Text>
      <Button title="Switch" onPress={switchSuppression} />
    <View>	 
   )
}
```

## Docs

#### Hooks

##### useNfcSupportedState
Return boolean value. Channel NFC support state.
Value updates on state change.

##### useNfcEnabledState
Return boolean value. Channel NFC state.
Value updates on state change.

##### useNfcSuppressionState
Return boolean value. Channel NFC suppresion state.
Value updates on state change.

##### useNfcSuppressor
Return object. Expose all module functionality.

## License

[MIT](https://choosealicense.com/licenses/mit/)

---
_Source: https://npm.io/package/react-native-nfc-suppress · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
