Latest React Native 0.62.0: Type Errror: Super expression must either be null or a function
See original GitHub issueIssue Description
When upgrading to the latest version of RN 0.62.0 importing the package leads to Type Errror: Super expression must either be null or a function
Steps to Reproduce / Code Snippets
- Upgrade RN to 0.62.0.
import { GiftedChat } from 'react-native-gifted-chat';
- Runtime error:
Type Errror: Super expression must either be null or a function
Expected Results
Gifted Chat to load normally
Additional Information
Seems to spawn from GiftedChat.js
line 3
- Nodejs version: 12.16.1
- React version: 16.11.0
- React Native version: 0.62.0
- react-native-gifted-chat version: 0.13.0
- Platform(s) (iOS, Android, or both?): only tested on Android
- TypeScript version: 3.8.3
Issue Analytics
- State:
- Created 3 years ago
- Reactions:21
- Comments:34 (1 by maintainers)
Top Results From Across the Web
React-native: Super expression must either be null or a ...
In the latest version of react native, 'React' and 'Component' is moved from 'react-native' to 'react' module. So you will have to import...
Read more >React-Native-Video: Super Expression Must Either Be Null ...
React Errors : Super expression must either be null or a function use and hence React finds that the Component you are trying...
Read more >React Errors : Super expression must either be null or a ...
The first culprit is usually that you have forgotten to export the component that you are trying to use and hence React finds...
Read more >React Errors : Super expression must either be null or a ...
Firstly, if you're certain that you're extending from the correctly named class, e.g. React.Component, not React.component or React.
Read more >React Native, TypeError: Super expression must either be ...
I'm trying to run my react native app in my physical device but every time I get this error TypeError: Super expression must...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I hacked together a fork w/ the new action-sheet using the currently released version here. Use it with
yarn add https://github.com/StagasaurusRex/react-native-gifted-chat.git#upgrade-action-sheet
or w/e the equivalent npm command is.Based on https://github.com/StagasaurusRex/react-native-gifted-chat/commit/58ae0c8969d4e472538ed7abcecbb4ce81114f5f, I forced using the new version of action sheet lib which fixes the issue.
package.json
run
yarn
againThe error should be gone ~