I want to update my key value of comment to a new value, while keeping the other keys as is. I know I'll probably need spread operator ... but I'm not sure the exact syntax. What would I need to put in setResource() to accomplish this?
const VideoPage = () => {
const [state, setResource] = useState(
{
video: 'placeholder'
loading: 'placeholder'
comment: 'placeholder'
}
)
const funct = () => {
setResource()
}
}