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

usePollContext

A hook that returns the PollContext value.

Best Practices

  • Use this hook inside Channel-scoped poll components.
  • Treat context values as read-only UI state.
  • Avoid heavy computations in hook consumers.
  • Prefer derived values from the context instead of duplicating state.
  • Handle missing poll state gracefully.