In this tutorials we will use a package named @react-native-community/checkbox to add checkboxes in react native. So follow the below setups:-
1) Install the @react-native-community/checkbox package like below in your application
yarn add @react-native-community/checkbox or npm install @react-native-community/checkbox --save On iOS, install cocoapods: npx pod-install
2) Link the module in your application
react-native link @react-native-community/checkbox
3) Import the package
import CheckBox from '@react-native-community/checkbox';
4) Example
follow below example to use checkbox
import React , {useState } from 'react'; import CheckBox from '@react-native-community/checkbox'; const [toggleCheckBox, setToggleCheckBox] = useState(false) function AddContactScreen ({navigation}){ return (); } export default AddContactScreen; setToggleCheckBox(newValue)} />
How to use Cloud Scheduler API to submit your sitemap.xml to Google Search Console using a Service Account
Horizontal Live Event Cards with Image and Gradient – React Native
React Native Tabs in Single File and Split Files
React Native List with Grid consisting of Icons and Text
React Native Cart System
Horizontal Live Event Cards with Image and Gradient – React Native
React Native Tabs in Single File and Split Files
React Native List with Grid consisting of Icons and Text
React Native Cart System