Nativebase: List not rendering and showing Invariant Violation error

Created on 21 Jul 2019  路  11Comments  路  Source: GeekyAnts/NativeBase

I have gone through these following points

Issue Description


When adding a Listview with ListItem getting below error
Invariant Violation: ListView has been removed from React Native. See https://fb.me/nolistview for more information or usedeprecated-react-native-listview`.

node, npm, react-native, react and native-base version, expo version if used, xcode version

node 12.6.0
npm 6.9.0
react-native 0.60.4
react 16.8.6

Expected behaviour

Listview suppose to render

Actual behaviour

Getting error

Steps to reproduce


Following is the code snippet
import { Content, Text, List, ListItem, Icon, Container, Left, Right, Badge, Body } from "native-base";

<List dataArray={datas} renderRow={data => <ListItem button noBorder

Is the bug present in both iOS and Android or in any one of them?

Yes

Any other additional info which would help us debug the issue quicker.

Issue #1282 already checked.Its not same.

high priority

Most helpful comment

Can you check with 2.13.0?

All 11 comments

Same breaking issue, when I use ANY of NativeBase components.

"react": "^16.8.6",
"react-native": "^0.60.4",
"native-base": "^2.12.2",

The problem was raised after an overall upgrade from:

"react": "^16.0.0-alpha.12",
"react-native": "^0.52.0",
"native-base": "^2.5.2",

Hi, thanks for reporting. This is happening because react-native has deprecated ListView and one component in native-base depends on ListView. Working on getting out fix by today.

I have removed all List and ListView code from my project, but still I am getting this above error.
Here are few screenshots:
Error-1
Error-2

In my app it is showing error here (as shown in screenshot): hamburger-button.js: 3 and at that line I have import { Icon } from "native-base";
So this is not directly linked to ListView, but still I am getting the same error.

Please suggest for this also. I am stuck here.

It might be related to some other package.
Can you try removing the Icon import and check if that works?

@sankhadeeproy007 After removing all references of Icon, I am not getting the above error.

More info:
After removing Icon I got the same error on another component of "native-base"
here:
import { Spinner } from "native-base";

Can you please suggest.

Can you check with 2.13.0?

It works....!!! Thanks Brother.... @sanketsahusoft ... Thanks for the prompt support.

Hey guys, great package, thanks!!

I'm going through the hassle of replacing all my Icon, List (and God knows what more) components imported from native-base and that have a dependency on react-native ListView. I'm currently on [email protected]. Can you tell me how long are you going to take to release your next update (ListView free) for me to see if it's worthy to proceed my manual changes? Many thanks!

Screenshot 2020-04-12 at 8 41 21 PM

I am getting above error . But it works in iOS

Below is the package info:

"native-base": "2.12.1",
"prop-types": "^15.6.2",
"react": "^16.6.3",
"react-native": "^0.58.5",

I have no ListView component but it's still getting back the invariant violation error. And also I have no Icon or Spinner that's I import from react-native or native-base.
image

I have no ListView component but it's still getting back the invariant violation error. And also I have no Icon or Spinner that's I import from react-native or native-base.
image

any solutions???

Was this page helpful?
0 / 5 - 0 ratings