var formData = new FormData();
formData.append('photos[]', photos);
formData.append('text', text); // добавляем новую строку. Если нужно массив строк - то по аналогии с photos, переменная 'texts[]'
...
$photos = $_FILES['photos'];
$text = $_POST['text'];
clients:[
// первый клиент
{
calls: [...] ,
mails: [...],
...
},
// и тд, другие клиенты
...
]
const [obj,setObj] = useState([{...},{...},{...}])
...
setObj(
[...obj].map( targetObject =>{
targetObject.someValue = 0;
return targetObject ;
}
))
useEffect(() => {
// Anything in here is fired on component mount.
console.log("mount");
return () => {
// Anything in here is fired on component unmount.
console.log("unmount");
// setValues({ input: "", textarea: "" }
};
}, []);