question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning:` ListView is deprecated and will be removed in a future release

See original GitHub issue

Current Behavior

Displays a warning about ListView

Warning:` ListView is deprecated and will be removed in a future release. See https://fb.me/nolistview for more information

- node_modules/expo/build/environment/muteWarnings.fx.js:27:24 in error
- node_modules/raven-js/src/console.js:35:36 in <unknown>
- node_modules/react-native/node_modules/fbjs/lib/warning.js:30:18 in printWarning
- node_modules/react-native/node_modules/fbjs/lib/warning.js:51:23 in <unknown>
- node_modules/react-native/Libraries/Utilities/warnOnce.js:29:10 in warnOnce
- node_modules/react-native/Libraries/react-native/react-native-implementation.js:70:6 in ListView
- node_modules/react-native-masonry/components/Masonry.js:63:16 in Masonry

Possible Solution

See https://fb.me/nolistview for more information

Context (Environment)

expo sdk33 rn 0.59.8, react 16.8.3

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:4
  • Comments:7

github_iconTop GitHub Comments

8reactions
dwidccommented, Feb 6, 2020

Following @jzyds solution, I used patch-package to modify react-native-masonry in node_modules. Tested seems OK so far.

In your project folder:

yarn add deprecated-react-native-listview
yarn add --dev patch-package postinstall-postinstall

Add patch-package to your package.json postinstall script:

"scripts": {
   "postinstall": "patch-package"
 }

Edit /node_modules/react-native-masonry/components/Masonry.js. Remove ListView from ‘react-native’, replace with one from deprecated-react-native-listview:

-import { View, ListView, Image, Text, Dimensions } from 'react-native';
+import { View, Image, Text, Dimensions } from 'react-native';
+import ListView from 'deprecated-react-native-listview';

Save your modification as patch:

yarn patch-package react-native-masonry

Verify your modification applied:

yarn install --check-files

yarn should restore react-native-masonry, and after that patch-package will kick in, applying your modification.

Done.

2reactions
wikramdascommented, Sep 17, 2019

This is not a warning it is an error so remove it as soon as possible.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invariant Violation: ListView has been removed. But
List VIew is deprecated in react native 0.60. So the quick fix is to use deprecated-react-native-listview. Need to add.
Read more >
How to Replace a React Native ListView Component with a ...
<ListView> was officially deprecated in React Native 0.48 . Sometimes, we ignore deprecation warnings (guilty! ) and don't deal with things ...
Read more >
deprecated-react-native-listview - npm package - Snyk
We found that deprecated-react-native-listview demonstrates a positive version release cadence with at least one new version released in the past 12 months. In ......
Read more >
deprecated-react-native-listview: Documentation | Openbase
Collection of modules that have been deprecated and removed from React Native ... Instead, migrate your apps to the new modules, like Airbnb's...
Read more >
deprecated-react-native-listview v0.0.8 - npm.io
Check Deprecated-react-native-listview 0.0.8 package - Last release 0.0.8 with MIT licence at our NPM packages aggregator and search engine.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found