Question: Instructions Part 1 : Hard Code ToDo List and Form In your project directory, open the App.jsx file. Inside the App component, hard code the
Instructions
Part : Hard Code ToDo List and Form
In your project directory, open the App.jsx file.
Inside the App component, hard code the ToDo list items and the form to add tasks. The code should resemble the attached App.jsx file.
Part : Move Into Separate Files
ToDoList.jsx:
Create a new file named ToDoList.jsx in the project directory.
Copy the ScrollView containing the tasks from App.jsx and paste it into the ToDoList.jsx file.
Import the necessary components and styles into ToDoList.jsx
ToDoForm.jsx:
Create a new file named ToDoForm.jsx in the project directory.
Copy the View containing the input field and button from App.jsx and paste it into the ToDoForm.jsx file.
Import the necessary components and styles into ToDoForm.jsx
Part : Import Separate Components
In App.jsx import the ToDoList and ToDoForm components.
Replace the hardcoded ToDo list and form sections with the components.
Submission Guidelines
GitHub
Create a new public GitHub repository to host your code.
Push all your assignment files except the "nodemodules" folder to the GitHub repository.
DL Submission
Compress all the files and folders for your assignment except the "nodemodules" folder into a single ZIP file.
Upload the ZIP file to the appropriate assignment dropbox on DL
Include the link to your GitHub repository in the comments area.The code for the app.jsx file:
My To Do List App
@format
import React from 'react';
import
SafeAreaView,
StyleSheet,
Pressable,
View,
Text,
ScrollView,
TextInput,
Button
from 'reactnative';
function App
return
Do laundry
Go to gym
Walk dog
;
const styles StyleSheet.create
task:
padding:
borderBottomWidth:
borderColor: #ccc
completed:
backgroundColor: #eee
taskText:
fontSize:
form:
flexDirection: 'row',
justifyContent: 'spacebetween',
alignItems: 'center',
marginHorizontal:
marginTop:
input:
flex:
borderWidth:
borderColor: #ccc
paddingHorizontal:
paddingVertical:
marginRight:
;
export default App;"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
