问题:
在我的react-native应用程序中,我使用带样式组件包的simple-react-chatbot。这就是我的代码的样子。
import React, { PureComponent } from "react";
import { ThemeProvider } from "styled-components";
import ChatBot from "react-simple-chatbot";
const theme = {
background: "#f5f8fb",
fontFamily: "Helvetica Neue",
headerBgColor: "#EF6C00",
headerFontColor: "#fff",
headerFontSize: "15px",
botBubbleColor: "#EF6C00",
botFontColor: "#fff",
userBubbleColor: "#fff",
userFontColor: "#4a4a4a"
};
class Trafficbot extends PureComponent {
static navigationOptions = {
title: "Trafficbot",
headerStyle: {
backgroundColor: "#06153b"
},
headerTintColor: "#fff",
headerTitleStyle: {
color: "#ffff"
}
};
render() {
return (
<ThemeProvider theme={theme}>
<ChatBot
headerTitle="Speech Recognition"
recognitionEnable={true}
steps={[
{
id: "1",
message: "What is your name?",
trigger: "2"
},
{
id: "2",
user: true,
trigger: "3"
},
{
id: "3",
message: "Hi {previousValue}, nice to meet you!",
end: true
}
]}
/>
</ThemeProvider>
);
}
}
export default Trafficbot;
但是当我运行应用程序时,它给了我这样的错误。
Object(se.keyframes) is not a function. (In 'Object(se.keyframes)(a())','Object(se.keyframes)' is an instance of Object)
我正在寻找解决方案,但找不到任何解决方案。有人可以帮我解决这个问题吗?谢谢!。