stream-chat-react-native icon indicating copy to clipboard operation
stream-chat-react-native copied to clipboard

Custom Gallery component do not have images and message prop's value as they are undefined

Open khushal87 opened this issue 2 years ago • 2 comments

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:

  1. Create a custom component as in the example.
  2. Try consoling the images and message prop in the Gallery custom component.
  3. 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

khushal87 avatar Jun 02 '22 12:06 khushal87

Hey team! Please add your planning poker estimate with ZenHub @khushal87 @madsroskar @santhoshvai @vishalnarkhede

vanGalilea avatar Jul 05 '22 08:07 vanGalilea

Let's update the docs so it'll be clear to our customers to use contexts over props

vanGalilea avatar Jul 05 '22 08:07 vanGalilea