deeptimancode
deeptimancode

Reputation: 1139

Why react-native Swipeout not working?

I am working on react-native Swipeout but after adding the npm package, but it's showing some error, i am posting the error message screenshots please go through it below.

enter image description here

npm install react-native-swipeout

npm install --save react-native-swipeout

imported Packages

import React, { Component, PropTypes } from 'react';
import {Text, View} from 'react-native';

import Swipeout from 'react-native-swipeout';

Code

let swipeBtns = [{
    text: 'Delete',
    backgroundColor: '#FF0000'
}];
<Swipeout 
   right={swipeBtns}>
    <View>
       <Text style={styles.items_name_txt}>{rowData.name}</Text>
       <View style={styles.items_list_view_line}></View>
    </View>
</Swipeout>

Please kindly go through my code and suggest me some solution.

Upvotes: 0

Views: 1204

Answers (1)

Lee Vaughn-Ogin
Lee Vaughn-Ogin

Reputation: 450

This won't work anymore because React Native has changed significantly since its introduction. The library owner updated the package, but did not publish the new changes.

Change your package.json to "react-native-swipeout": "https://github.com/dancormier/react-native-swipeout.git"

This should fix your problem

Upvotes: 1

Related Questions