React-native-gifted-chat: Syntax error on web

Created on 15 Jan 2019  路  2Comments  路  Source: FaridSafi/react-native-gifted-chat

Issue Description

When I try to run it on web (react-native-web) I get a syntax error.

Failed to compile.

./node_modules/react-native-gifted-chat/src/GiftedChat.js
SyntaxError: /Users/user/app/node_modules/react-native-gifted-chat/src/GiftedChat.js: Unexpected token (308:6)

  306 |     const AnimatedView = this.props.isAnimated === true ? Animated.View : View;
  307 |     return (
> 308 |       <AnimatedView
      |       ^
  309 |         style={{
  310 |           height: this.state.messagesContainerHeight,
  311 |         }}

I don't know why this problem exists as I tried earlier versions on the web and also this version on Android and it worked perfectly.
I checked the GiftedChat.js file and it seems to be fine.

Additional Information

  • Nodejs version: 8.10.0
  • React version: 16.7.0
  • React Native version: 0.57.8
  • react-native-gifted-chat version: 0.6.0
  • Platform(s) (iOS, Android, or both?): react-native-web

Most helpful comment

same problem, but with <View> tag
and yes, it works with react-web-gifted-chat, but it not updated and stale version of react-native-gifted-chat.
e.g.: In react-web-gifted-chat message and user have id instead _id in react-native-gifted-chat etc.
I think, better to use new version with new features
Can you reopen this issue?

All 2 comments

Works perfectly on react-web-gifted-chat

same problem, but with <View> tag
and yes, it works with react-web-gifted-chat, but it not updated and stale version of react-native-gifted-chat.
e.g.: In react-web-gifted-chat message and user have id instead _id in react-native-gifted-chat etc.
I think, better to use new version with new features
Can you reopen this issue?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xcxooxl picture xcxooxl  路  3Comments

luisar picture luisar  路  3Comments

radvc picture radvc  路  3Comments

Fr33maan picture Fr33maan  路  3Comments

iamdurui picture iamdurui  路  3Comments