Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am trying to make a function that allows a user to input a number, and add that number to an array. However, if the

I am trying to make a function that allows a user to input a number, and add that number to an array. However, if the user changes their mind, it deletes the previous number that they inputted and inputs a new one. For some reason, the array does not get updated with a new number. If I manually add numbers in the state array, and press the button, it deletes the first number but does not add another one. But if I put in another number in the text input and press the button again, it deletes the first number and adds the previous number I inputted. How can I make it so that it instantly adds the new number while deleting the old one? I did this using react native. Thank you for help in advance. image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Development For Dummies

Authors: Allen G. Taylor

1st Edition

978-0764507526

More Books

Students also viewed these Databases questions