![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
rn-bluetooth-classic
Advanced tools
A React Native Bluetooth provider using react-native-bluetooth-classic
rn-bluetooth-classic
is a React Native package that provides a Bluetooth context and hooks for managing Bluetooth functionality in your app. It handles permissions, device scanning, connection management, and data reception.
You can install rn-bluetooth-classic
via npm or yarn:
npm install rn-bluetooth-classic
or
yarn add rn-bluetooth-classic
rn-bluetooth-classic
uses react-native-bluetooth-classic
under the hood to scan and connect to devices and only acts as a wrapper on top to make it easier to use.
npm install react-native-bluetooth-classic
or
yarn add react-native-bluetooth-classic
BluetoothProvider
and wrap your app with it in your root component:import { BluetoothProvider } from 'rn-bluetooth-classic';
const App = () => {
return (
<BluetoothProvider>
<YourApp />
</BluetoothProvider>
);
};
useBluetooth
hook in your components to access Bluetooth functionality:import { useBluetooth } from 'rn-bluetooth-classic';
const YourComponent = () => {
const { isScanning, devices, scanDevices, connectToDevice } = useBluetooth();
// Your component logic here...
};
If you are using Expo and want to integrate rn-bluetooth-classic
, you can use the with-rn-bluetooth-classic
Expo plugin maintained by amitferman. This plugin helps with auto-configuration of permissions and protocols.
amitferman has released and maintains a with-rn-bluetooth-classic
Expo plugin to get things working.
You can install react-native-bluetooth-classic
and with-rn-bluetooth-classic
from npm using Expo's expo install
command:
expo install react-native-bluetooth-classic with-rn-bluetooth-classic
After installation, configure your app.json
or app.config.json
with the following settings:
{
"plugins": [
["with-rn-bluetooth-classic",
{
"peripheralUsageDescription": "Allow myDevice to check bluetooth peripheral info",
"alwaysUsageDescription": "Allow myDevice to always use bluetooth info",
"protocols": [
"com.myCompany.p1",
"com.myCompany.p2"
]
}
]
]
}
Make sure to replace "com.myCompany.p1"
and "com.myCompany.p2"
with your own protocol identifiers.
For a complete example of how to use rn-bluetooth-classic
, check out the example directory in this repository.
Contributions are welcome! Please open an issue or submit a pull request if you find any bugs or want to suggest improvements.
This package is licensed under the MIT License. See the LICENSE file for details.
Feel free to customize this template with additional information specific to your package. Make sure to replace placeholders like YourApp
with actual names or values.
FAQs
A React Native Bluetooth provider using react-native-bluetooth-classic
The npm package rn-bluetooth-classic receives a total of 2 weekly downloads. As such, rn-bluetooth-classic popularity was classified as not popular.
We found that rn-bluetooth-classic demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.