Info:
This is documentation for Stream Chat React Native SDK v5, which is no longer actively maintained. For up-to-date documentation, see the latest version (v9).

KeyboardContext

KeyboardContext is provided by Channel component. If you are not familiar with React Context API, please read about it on React docs.

Basic Usage

KeyboardContext can be consumed by any of the child component of Channel component as following:

import { useContext } from "react";
import { KeyboardContext } from "stream-chat-react-native";

const { dismissKeyboard } = useContext(KeyboardContext);

Alternatively, you can also use useKeyboardContext hook provided by library to consume KeyboardContext.

import { useKeyboardContext } from "stream-chat-react-native";

const { dismissKeyboard } = useKeyboardContext();

Value

dismissKeyboard

Function to dismiss the keyboard.

Type
function
Add Chat to my app: getstream.io/SKILL.md

The fastest way to build with Stream. Start a new project or improve an existing one. Full CLI and documentation integration out of the box.


Ask your agent:

/stream Build me a Social App with Feeds and Moderation.
/stream Any livestream calls running?
/stream Chat React Native v5: <Your Question>