Skip to content

Simple RN App that demonstrates how to use tRPC for efficient server communication in a React Native app. The app includes features like fetching a custom greeting based on user input and displaying a user list from a mock tRPC server in a dynamic table. It also incorporates TanStack Query for managing server state and caching.

Notifications You must be signed in to change notification settings

RevanNasser/trpc-react-native

Repository files navigation

trpc-react-native

This is a simple React Native application that demonstrates the use of tRPC for managing server communication and rendering a dynamic table in a mobile app.

The app includes:

  • A greeting feature where users can input their name and fetch a custom greeting.
  • A user list fetched from the mock tRPC server and displayed in a table.

Features

  • React Native: Build cross-platform mobile apps.
  • tRPC: Type-safe APIs for client-server communication.
  • TanStack Query: Manage server state and caching efficiently.

Demo

Demo


Installation

  1. Clone the repository:
    git clone https://github.com/RevanNasser/trpc-react-native.git
    cd trpc-react-native
    
  2. Install dependencies:
    yarn install
     # or
     npm install
    

3.Start the mock tRPC server:

npx ts-node mockServer.ts

4.Start the React Native app:

 npx expo start

About

Simple RN App that demonstrates how to use tRPC for efficient server communication in a React Native app. The app includes features like fetching a custom greeting based on user input and displaying a user list from a mock tRPC server in a dynamic table. It also incorporates TanStack Query for managing server state and caching.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published