LucasBassetti / react-native-chatbot

:speech_balloon: Easy way to create conversation chats
https://github.com/LucasBassetti/react-simple-chatbot
MIT License
248 stars 116 forks source link

Chatbot component keeps re rendering any time a modal is closed or open #73

Open edogbosunny opened 4 years ago

edogbosunny commented 4 years ago

Description

I implemented the Chatbot Component in a Modal and noticed that the chatbot rerenders and starts all steps afresh any time the modal is closed or opened. please i need help to make sure that the contents in the Modal component is not re-rendered.

          animationType="slide"
          transparent={true}
          visible={modalVisible}
        >
          <View style={styles.modalMainView}>
            <Icon
              style={styles.modalCloseBtn}
              onPress={() => {
                this.setModalVisible(!modalVisible);
              }}
              name="close"
              size={
                Platform.OS === "ios" ? hp("5.0%") : hp("5%")
              }
              color={Colors.lightBlue}
            />
            <View style={{ height: hp('85%') }}>
              <ChatBot steps={steps}
                customStyle={{ borderColor: '#fff' }}
                contentStyle={{ backgroundColor: '#fff' }} />
            </View>
          </View>
        </Modal>

Screenshots

Screen-Recording-2020-04-23-at-1

smilydronavalli commented 4 years ago

Hi

Can guide me how to install the chatbot without errors It will great help for us

ThanksinAdvance

edogbosunny commented 4 years ago

Hi

Can guide me how to install the chatbot without errors It will great help for us

ThanksinAdvance

Hi @smilydronavalli i installed this on react native version 0.61.5. i would suggest you install this library first then if you have any errors we would debug that together. hope this helps.

smilydronavalli commented 4 years ago

Hi @edogbosunny I installed on react native version 0.62.2

I got the following error Simulator Screen Shot - iPhone 11 - 2020-04-24 at 13 02 57 Kindly suggest me how to solve this issue

edogbosunny commented 4 years ago

@smilydronavalli try installing "@react-native-community/art" then do a pod install. and rebuild your project

smilydronavalli commented 4 years ago

@edogbosunny I installed but still showing error

kindly advice me

edogbosunny commented 4 years ago

@smilydronavalli can we have a remote session to further debug this?

smilydronavalli commented 4 years ago

Yes But my system doesnot have access because i am using mac system

Can you guide me

edogbosunny commented 4 years ago

@smilydronavalli please join this meeting via zoom https://us04web.zoom.us/j/74241947675?pwd=b1pVK3o0N1Byb2dmYm96bFd2VnVxQT09

smilydronavalli commented 4 years ago

its asking host login fro zoom

edogbosunny commented 4 years ago

@smilydronavalli please try joining now

smilydronavalli commented 4 years ago

Hi @edogbosunny ,

Its working in react native 0.61.5 version but it shows so many warnings regarding style how can you solve this one. Simulator Screen Shot - iPhone 11 - 2020-04-24 at 15 15 51

Thanks a lot

edogbosunny commented 4 years ago

I haven't yet. Still working on creating custom components once I am done I would look into that

On Fri, Apr 24, 2020, 10:46 AM Dronavalli notifications@github.com wrote:

Hi @edogbosunny https://github.com/edogbosunny ,

Its working in react native 0.61.5 version but it shows so many warnings regarding style how can you solve this one. [image: Simulator Screen Shot - iPhone 11 - 2020-04-24 at 15 15 51] https://user-images.githubusercontent.com/14346725/80199034-7fe48b00-863e-11ea-8c38-fc436e4f90a2.png

Thanks a lot

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LucasBassetti/react-native-chatbot/issues/73#issuecomment-618914318, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFY7BKCLCIRE6W7G5GJX7SDROFNYDANCNFSM4MO4W6BQ .

smilydronavalli commented 4 years ago

Hi,

One more doubt sorry for the inconvenience

Text field is not enable for chatting.

Can you suggest me how???

edogbosunny commented 4 years ago

You would need set the user props to true in the steps. There is an example.for this in the documentation. Hope.this helps

cudavasol commented 3 years ago

hello @edogbosunny can you show me how you manage to modify the botAvatar image?

thanks