Comments (3)
You might use the latest react, so you have to import PropTypes as a standalone package
from react-web-gifted-chat.
I had the same issue. It's react-native-parsed-text
causing this issues because it's using the Object-spread syntax as shown in the error (...ReactNative.Text.propTypes
), which is obviously not compiled by babel in your Project. You need to configure webpack so it compiles the module. If you created your App using create-react-app, there is no way to configure webpack directly. You either have to eject
the project, or use react-app-rewired to do so.
Then, in webpack-config you need to add the module path of react-native-parsed-text
to the babel-loader 'includes'-property. Something like this:
// webpack-config:
...
{
test: /\.(js|jsx|mjs)$/,
include: [
paths.appSrc,
'YOUR-PROJECT-PATH/node_modules/react-native-parsed-text'
],
loader: require.resolve('babel-loader')
},
...
If your using react-app-rewired, your config-overrides.js
might look something like this (didn't test):
const { getBabelLoader } = require('react-app-rewired')
const fs = require('fs')
const path = require('path')
const appDirectory = fs.realpathSync(process.cwd())
const resolveApp = relativePath => path.resolve(appDirectory, relativePath)
/* config-overrides.js */
module.exports = function override (config, env) {
const babelLoader = getBabelLoader(config.module.rules)
babelLoader.include = [resolveApp('src'), resolveApp('node_modules/react-native-parsed-text')]
return config
}
Note: Unfortunately, after this step I got to issue#1.
from react-web-gifted-chat.
Yeah, it was broken, in the next upgrade it will be working, I also fixed example, this is already on repository, but it's not pushed to npm, it also contains new react version
from react-web-gifted-chat.
Related Issues (20)
- Message list doesn't update when messages change HOT 1
- Message list overflow not working on Firefox HOT 3
- <div> component error HOT 3
- send message when Enter key press HOT 10
- quick replies? HOT 1
- Not able to update the state of single chat HOT 1
- Replace hardcoded composerHeight property with prop
- Long Messages don't wrap with fixed width chat window HOT 1
- build fail Can't resolve 'react-native' HOT 3
- How to configure gift-chat to send message when enter key is pressed? HOT 1
- renderUsernameOnMessage didn't work HOT 1
- Display Message not send error
- Not working
- Legacy context API has been detected within a strict-mode tree. HOT 1
- Warning: findDOMNode is deprecated in StrictMode.
- renderChatFooter dont show on bottom of list
- Messages change order if some id is accidently same of two messages when other person sends message
- chat is empty after upgrading react version to ^17.0.2 HOT 5
- Warning: Legacy context API has been detected within a strict-mode tree. The old API will be supported in all 16.x releases, but applications using it should migrate to the new version. Please update the following components: GiftedChat, View HOT 1
- NOT RENDERING ANYTHING HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-web-gifted-chat.