Files
react-telegram/packages/examples
Kyle Fang bbf30d8b34 wip: refactor spa-hooks to use useSyncExternalStore and immer
- Replace context-based state management with useSyncExternalStore
- Add immer for immutable state updates
- Implement selector-based API for better performance
- Add TgProvider to track current chat context
- Strong typing support with TgGlobalState interface

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-08 22:59:38 +08:00
..

React Telegram Examples

This package contains example bots built with React Telegram.

Examples

  • Basic Bot: Simple bot demonstrating core features
  • Echo Bot: Responds to user messages
  • Keyboard Bot: Shows how to use inline and reply keyboards
  • Media Bot: Demonstrates sending photos, documents, and other media
  • Advanced Bot: Complex bot with state management and multiple features

Getting Started

  1. Set up your environment variables:

    API_ID=your_api_id
    API_HASH=your_api_hash
    BOT_TOKEN=your_bot_token
    
  2. Install dependencies:

    bun install
    
  3. Run an example:

    bun run examples/basic-bot.tsx
    

Learn More

See the main documentation for detailed guides and API reference.