'Recyclerlistview requires always a type
Why I get this error message?
Error: Recyclerlistview requires always a type...
I want to load more data and if I push my data then I get the error.
const handleNew = () => {
console.log('SS');
setChatData(prevMsg => [...prevMsg, prevMsg.push(
{
type: 'NORMAL',
item: {
id: '1',
name: 'David SSASDAASD',
image: 'https://picsum.photos/200',
online: 1,
text: 'Super',
date: '2022-01-30',
isFixed: 0,
isMuted: 0,
}
})]
)
};
the ...prevMsg array is the same as the push data
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
