Instead of eventTitle
, eventDescription
, eventStartDate
or eventEndDate
, are there any better naming suggestions for dsestructuring params?
const ComponentName = ({event}) => {
const {
title: eventTitle,
description: eventDescription,
startDate: eventStartDate,
endDate: eventEndDate,
} = event;
const [title, setTitle] = useState(eventTitle);
const [description, setDescription] = useState(eventDescription);
const [startDate, setStartDate] = useState(eventStartDate);
const [endDate, setEndDate] = useState(eventEndDate);
return (
<Container>
<div>hello</div>
</Container>
);
};