The Smartbills React Native SDK provides native components for displaying receipts, barcodes, and integrating with the Smartbills platform in React Native and Expo applications.
Installation
Peer Dependencies
The following peer dependencies are required:
Quick Start
Initialize the SDK
Call initReactNativeSDK() at the entry point of your application before rendering:
Provider Setup
Wrap your application with SmartbillsReactNativeProvider:
Components
Receipt
The main receipt display component that renders a full digital receipt:
ReceiptOriginal
Displays the original format of a receipt:
ReceiptSkeleton
Loading placeholder while receipt data is fetching:
Receipt Sub-Components
Individual receipt sections for custom layouts:
Barcode & QR Code
Standalone barcode and QR code rendering:
Money
Formatted money display with currency support:
PowerBySmartbills
Branding attribution component:
Hooks
useReceiptRef
Get a reference to the receipt component for programmatic actions:
useReactNativeSDK
Access the React Native SDK context:
Using React Hooks SDK
The React Native SDK works alongside @smartbills/react-hooks-sdk for data fetching. All hooks from the React SDK are available:
iOS (Info.plist)
Android (AndroidManifest.xml)
Version Compatibility
Test on real devices — Camera and barcode scanning functionality may differ from simulators.
Use Expo — The SDK is optimized for Expo projects but works with bare React Native as well.