const object1 = {name: "David", id=5};
If I use the initial state as an empty array:
const [relatedPosts, setRelatedPosts] = useState([])
and then I use setRelatedPosts(object1) will the relatedPosts become an array with object1 inside it? Or it will be just object1 and React ignores the empty array set as initial value.
 
     
     
     
    