0.1.14 • Published 4 months ago
rn-helpcrunch v0.1.14
rn-helpcrunch
React Native component for Helpcrunch chat widget
Installation
npm install rn-helpcrunch --save
Usage
import { HelpCrunchWidget } from 'rn-helpcrunch';
const widgetRef = useRef();
const user = {
email: 'react_native_user@somemail.com',
name: 'reactNativeUser',
user_id: '32132133123123'
};
const loginUser = (user) => {
widgetRef.current.userAuth(user);
}
const onReady = () => {}
const onChatOpen = () => {}
const onChatClose = () => {}
const onCustomerMessage = () => {}
const onAgentMessage = () => {}
const onNewUnreadChat = () => {}
const onPreChatFormSubmit = () => {}
const onError = () => {}
// ...
useEffect(() => {
loginUser(user);
}, [dependencies]);
<HelpCrunchWidget organization="organization"
appId="appId"
ref={widgetRef}
onReady={onReady}
onChatOpen={onChatOpen}
onChatClose={onChatClose}
onCustomerMessage={onCustomerMessage}
onAgentMessage={onAgentMessage}
onNewUnreadChat={onNewUnreadChat}
onPreChatFormSubmit={onPreChatFormSubmit}
onError={onError}
></HelpCrunchWidget>
License
MIT
Made with create-react-native-library
0.1.14
4 months ago
0.1.12
10 months ago
0.1.13
10 months ago
0.1.11
10 months ago
0.1.10
10 months ago
0.1.9
10 months ago
0.1.8
10 months ago
0.0.12
10 months ago
0.0.11
11 months ago
0.0.10
12 months ago
0.0.9
1 year ago
0.0.8
1 year ago
0.1.7
1 year ago
0.1.6
1 year ago
0.1.5
1 year ago
0.1.4
1 year ago
0.1.3
1 year ago
0.1.2
1 year ago
0.1.1
1 year ago
0.1.0
1 year ago