GetStream / stream-chat-react-native

💬 React-Native Chat SDK ➜ Stream Chat. Includes a tutorial on building your own chat app experience using React-Native, React-Navigation and Stream
https://getstream.io/chat/sdk/react-native/
Other
971 stars 324 forks source link

TypeError: setMaxNumberOfFiles is not a function. #1141

Closed jr00n closed 2 years ago

jr00n commented 2 years ago
 const userToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiY29vbC1ibG9jay02IiwiZXhwIjoxNjQ0NzczNzYwfQ.p8P7R93KSLsEAqhZPjFt6dbWz44GpR94GprwGejNDqM';

const streamChatUser = {id: 'cool-block-6'};
const chatClient = StreamChat.getInstance('xxx');
const connectUserPromise = chatClient.connectUser(
  streamChatUser,
  userToken,
);
const channel = chatClient.channel('livestream', 'livemeditatie'); 

<Chat client={chatClient}>
    <Channel channel={channel}>
        <MessageList />
        <MessageInput/>
   </Channel>
</Chat>

is producing this error:

TypeError: setMaxNumberOfFiles is not a function. (In 'setMaxNumberOfFiles(maxNumberOfFiles != null ? maxNumberOfFiles : 10)', 'setMaxNumberOfFiles' is undefined)

Just try to follow this tutorial: https://getstream.io/chat/react-native-chat/tutorial/#setup

using "stream-chat-react-native": "3.10.2"

gz#19512

vishalnarkhede commented 2 years ago

@jr00n I think you missing the OverlayProvider component - https://getstream.io/chat/docs/sdk/reactnative/basics/hello_stream_chat/#overlay-provider

vishalnarkhede commented 2 years ago

Hey I am going to close this issue for now.