Skip to main content

React Native Library

A React Native library for Filum survey

Installation

npm package

npm i react-native-filum-survey

Usage

import SurveyWebView from "react-native-filum-survey";

// ...
const [webviewVisible, setWebviewVisible] = useState(false);

return (
<SafeAreaView>
<Pressable onPress={() => setWebviewVisible(true)}>
<Text>Open survey</Text>
</Pressable>
<SurveyWebView
visible={webviewVisible}
onClose={() => setWebviewVisible(false)}
campaignId="your_campaign_id"
userEmail="user@email.com"
userPhone="111222333"
/>
</SafeAreaView>
)

Props

PropertyDescriptionType
visibleWhether the webview is visible or notboolean
onCloseThe function that will be called when user clicks the close (x) buttonfunction
campaignIdID of the campaignstring
userPhoneUser phonestring (optional)
userEmailUser emailstring (optional)
transactionIdID of the transactionstring (optional)