Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lc3t35 opened this issue Jul 7, 2019 · 7 comments
Open

Comments

@lc3t35
Copy link

lc3t35 commented Jul 7, 2019

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

@wikramdas
Copy link

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

@yogevlahyani
Copy link

+1

@shachardevops
Copy link

+1. still not working

@jzyds
Copy link

jzyds commented Oct 31, 2019

npm install deprecated-react-native-listview;
import ListView from 'deprecated-react-native-listview';

This is my temporary solution

@dwidc
Copy link

dwidc commented 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.

@BinniZenobioCordovaLeandro

hey, I have the same problem!

@mshafex
Copy link

mshafex commented Jan 14, 2021

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.

Hey This solution works for the first time i use it them i have this error/Warning
image

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
in Masonry (at App.js:89)
in RCTView (at View.js:34)
in View (at App.js:60)
in App (at renderApplication.js:45)
in RCTView (at View.js:34)
in View (at AppContainer.js:106)
in RCTView (at View.js:34)
in View (at AppContainer.js:132)
in AppContainer (at renderApplication.js:39)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants