pro804/Read-and-Write-with-SQLite-App
A simple and educational React Native User Form application built with Expo that demonstrates how to read from and write to a local SQLite database on a mobile device.
๐ฑ Read-and-Write-with-SQLite-App
A simple and educational React Native application built with Expo that demonstrates how to read from and write to a local SQLite database on a mobile device. This app is intended for learners and developers who want a practical example of integrating SQLite with React Native using the Expo ecosystem.
โจ Designed for clarity and ease-of-use, this app is perfect for those new to mobile development with Expo and local data storage.
๐ Table of Contents
- Introduction
- Features
- Installation
- Usage
- Project Structure
- Dependencies
- Configuration
- Troubleshooting
- Contributing
- License
๐งญ Introduction
This project was created to help developers understand how to implement local persistent storage using SQLite within an Expo-based React Native app. It provides a minimal yet functional example of creating and managing a user database โ ideal for use cases like contact lists, offline storage, and user data management.
โจ Features
- ๐ฆ Add new user records to a local SQLite database.
- ๐ Display a real-time list of all users stored in the database.
- ๐พ Uses device-local SQLite storage (offline functionality).
- ๐ Built using Expo for fast development and easy deployment.
- ๐จ Clean UI with user-friendly icons.
โ๏ธ Installation
-
Clone the repository:
git clone https://github.com/your-username/Read-and-Write-with-SQLite-App.git cd Read-and-Write-with-SQLite-App -
Install dependencies:
npm install
-
Start the Expo development server:
npm start
โถ๏ธ Usage
- Open the Expo Go app on your Android/iOS device.
- Scan the QR code generated in the terminal or browser.
- Use the interface to:
- Add a new user by entering their name.
- View a list of all saved users.
๐ก The app runs entirely on the local device โ no network required!
๐ฆ Dependencies
- React Native (via Expo)
- Expo SQLite โ for database access
- Expo CLI โ for development and testing
All dependencies are installed via
npm install.
๐ง Configuration
No additional configuration is required. SQLite creates a local .db file on the device, and the database setup is handled automatically when the app starts.
If you wish to modify the schema:
- Edit
database.jsto change the table creation logic. - Reinstall the app to reset the database.
๐ ๏ธ Troubleshooting
-
If the app fails to start, try clearing Expoโs cache:
npm start -- --clear
-
Ensure you have the Expo Go app installed on your device.
-
For Android emulators, ensure they are set up with Google Play services for Expo.
๐ค Contributing
Contributions are welcome! If you have suggestions, feature requests, or improvements:
- Fork the repository.
- Create a new branch (
git checkout -b feature-name). - Make your changes.
- Submit a pull request.
๐ License
This project is licensed under the MIT License.
