Answer the question
In order to leave comments, you need to log in
How to create a page with contacts (name, number) in React with the ability to add/remove?
The employer sent a TOR for the frontend developer, to create an application for the contact list on React, in which it should be possible to add / delete / edit contacts, it is also desirable to have a search function. I found a similar solution in JavaScript, but I don’t understand how to transfer it.
<!DOCTYPE html>
<html>
<body>
<button onclick = "myFunc()">Записать</button>
<input type = "text">
<p id = "numbers"></p>
<script>
var numbers = ["Victor", "John", "Robert"];
document.getElementById("numbers").innerHTML = numbers;
var newNumber; //
function myFunc() {
newNumber = document.getElementsByTagName( "input" )[0].value;
numbers.unshift( newNumber );
document.getElementById("numbers").innerHTML = numbers;
}
</script>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
Google creating a crud application on react, you can even use English-language resources. In general, when I was training, I wrote something similar, but I don’t remember if it’s completely shitty code https://github.com/kirbi96/kirbi96.github.io/tree/...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question