From 0c9e23797064628df54fcb6dc20da7f2c16c7f8a Mon Sep 17 00:00:00 2001 From: spenlep-amzn <150714337+spenlep-amzn@users.noreply.github.com> Date: Mon, 16 Jun 2025 16:00:36 -0700 Subject: [PATCH] [connectReactNativeChat] docs: update components documentation --- .../connectReactNativeChat/README.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/mobileChatExamples/connectReactNativeChat/README.md b/mobileChatExamples/connectReactNativeChat/README.md index 33d998a..ac0653d 100644 --- a/mobileChatExamples/connectReactNativeChat/README.md +++ b/mobileChatExamples/connectReactNativeChat/README.md @@ -144,12 +144,21 @@ Please refer to the ChatJS README: https://github.com/amazon-connect/amazon-conn ## Components -ChatScreen includes these main components: +The demo app uses these main components: -- `initiateChat.js`: handles HTTP request to your personal chat backend -- `ChatSession.js`: low-level abstraction on top of ChatJS -- `ChatWrapper.js`: manages chat state at the UI level, handling loading/disconnect -- `ChatWidget.js`: renders chat composer and transcript +- `ChatUI.js`: layout component that renders GiftedChatUI component +- `ChatContext.js`: a context hook managing all ChatJS business logic and state + +```tree +App.js +└── ChatUIWrapper (src/ChatUI.js) + └── ChatProvider (Context Provider from src/ChatContext.js) + └── ChatUI (Main UI Component) + ├── Header Section + │ ├── Title + │ └── Button (Launch Chat/End Chat) + └── GiftedChat (Chat UI from react-native-gifted-chat) +``` ## Additional Features