map is not a function react
This can happen if the data type msgs is not an array. if you doing this
with "data" JSON object from an API response. map is only available to arrays
since it lives on the array prototype array.prototype.map.
You cannot use map on an object.
like this:
const [repos, setRepos] = useState([{}])
You can use Object.keys to create an array out of the JSON object and
then map over the keys to get the values out of an object.