stream-chat-react-native
stream-chat-react-native copied to clipboard
Custom Gallery component do not have images and message prop's value as they are undefined
Describe the bug
The images
and message
prop in the Gallery component is undefined on the console. If we follow the example:
const CustomGallery = ({ images, onPressIn }) => {
console.log(images);
return (/** Your custom UI */)
}
in here you will get the value of images
undefined. Moreover, the message
prop on the console is also undefined.
Dev environment info (please complete/provide the following information):
The latest version of the SDK has the problem
To Reproduce Steps to reproduce the behavior:
- Create a custom component as in the example.
- Try consoling the
images
andmessage
prop in the Gallery custom component. - You get
undefined
consoled.
Expected behavior It should console and have the images and the message object. Having a context explicitly might solve the issue but I believe the props should have the value too. The props should align against the Typescript too.
Additional context Nil
Screenshots Nil
Hey team! Please add your planning poker estimate with ZenHub @khushal87 @madsroskar @santhoshvai @vishalnarkhede
Let's update the docs so it'll be clear to our customers to use contexts over props