```jsx```
import React, { useState } from 'react';
import { View, TextInput, Button, FlatList } from 'react-native';
```
```jsx```
const Todo = () => {
const [todos, setTodos] = useState([]);
const [input, setInput] = useState('');
// Code for handling todo item creation and deletion
return (
// Code for rendering the todo list and input field
);
};
```jsx```
const handleAddTodo = () => {
if (input.trim() !== '') {
setTodos([...todos, { id: Math.random().toString(), text: input }]);
setInput('');
}
};
const handleDeleteTodo = (id) => {
setTodos(todos.filter((todo) => todo.id !== id));
};
```jsx```
return (
setInput(text)}
/>
item.id}
renderItem={({ item }) => (
{item.text}
)}
/>
);
```jsx```
const App = () => {
return (
);
};
export default App;