leecade / leecade/react-native-swiper

did not work on RN 0.61.5-Invariant Violation

Open
#1,133 8 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

Which OS ?

Android

Version

Which versions are you using:

  • react-native-swiper v1.5.14
  • react-native v0.61.5
import * as React from 'react';
import {StyleSheet, Text, View} from "react-native";
import Swiper from 'react-native-swiper'

export class SwiperComponent extends React.Component {

  render() {
    return (
      <Swiper>
        <View>
          <Text>sss</Text>
        </View>
        <View>
          <Text>aaa</Text>
        </View>
      </Swiper>
    );
  }
}

error:
Invariant Violation: Element type is invalid: expected a string(for built-in components) or a class/function(for composite components) but got:undefined.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Android example with react-native-swiper v1.5.14 and React Native 0.61.5. Inspect the component export and the reported Element type is invalid error to identify the incompatibility. Done means the provided SwiperComponent renders without the invariant violation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.