Skip to content

phos-dev/react-native-editable-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-editable-list

An editable React list component

NPM JavaScript Style Guide

Install

npm install --save react-native-editable-list

Usage

import React, { useState } from 'react';
import { StyleSheet, Text, View, FlatList } from 'react-native';
import EditableList from 'react-native-editable-list';

export default function App() {
  const [list, setList] = useState([]);
  return (
    <View style={styles.container}>
	  <EditableList placeholder='Please, type something' onListChange={setList.bind(this)} list={list}/>
	  <Text> Data </Text>
	  <Text> {list.toString()} </Text>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: 'yellow',
    alignItems: 'center',
    justifyContent: 'center',
    padding: 20
  },
});

License

MIT © phos-dev