twixor-chat-agent-sdk
v1.0.5
Published
A simple React Native component built by Twixor Developers for Integration
Downloads
18
Readme
Twixor Agent SDK
Twixor Agent Chat App which was built with Expo thats needs to be Integrated with Existing Eeact Native App Which is Built With EXPO.
Please Follow the Below Steps to Configure
Expo-React-Native [ Parent Screen ]
//The Following commands is to include the SDK from npm Repository
npm install twixor-chat-agent-sdk --save-dev
"or"
//The Following commands is to include the SDK from Local in Package.json
"twixor-chat-agent-sdk": "file:customPlugin/twixor-chat-agent-sdk"
//All the Components in the SDK has to be Declared in Parent (your) Application's Navigation Container, in Future the New Components added to the SDK has Also to be included in the Navigation Container.
//Version 1.0.1
// Components in the Current Version of SDK
// 1. ChatScreen
//The Following lines of Code has to be Integrated in your Application to Use our SDK, routing.js
import ChatScreen from 'twixor-chat-agent-sdk';
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen name="parent1" component={parent1} />
<Stack.Screen name="ChatScreen" component={ChatScreen} /> //from SDK, to be added as dependency
</Stack.Navigator>
</NavigationContainer>
//Sample code to pass data as props to the SDK. eg: in parent1.js
navigation.navigate("ChatScreen", {userDetails: {
name: route.params.username,
token: route.params.token,
userId: 2,
baseUrl:"www.example.com/url"
} });
Twixor agent App Ui will be generated