Socket
Book a DemoInstallSign in
Socket

@nhost/react-native-template

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nhost/react-native-template

A template project to get you up to speed on how to use Nhost with React Native

npmnpm
Version
0.0.9
Version published
Weekly downloads
1
Maintainers
2
Weekly downloads
 
Created
Source

Nhost React Native Template

This template bootstrapped using react-native-community/cli showcases how to properly use Nhost SDK within your React Native project.

For a more comprehensive guide on how to build on top of this template you can follow the quickstart guide.

Features

  • Email/Password Authentication
  • Sign-in with Apple and Google
  • File upload

Usage

Ensure that your environment is set up to work with React Native. Follow the setup guide available on the official React Native website.

  • Initialize your project with this template

    npx react-native init myapp --template @nhost/react-native-template
    
  • Replace the subdomain and region placeholders in the root.tsx with your Nhost project values from the overview page.

How to enable Sign in with Apple and/or Google

Navigate to your nhost project Sign-In Methods settings and enable Google and/or Apple.

Configure Permissions for uploading files

  • Edit the files table permissions

    • Navigate to the files table within the Database tab
    • Click on the three dots (...) next to the files table
    • Click on Edit Permissions
  • Modify the Insert permission for the user role:

    • Set Row insert permissions to Without any checks
    • Select all columns on Column insert permissions
    • Save
  • Select - Set Row select permissions to With custom check and fill in the following rule: - Set Where to files.uploaded_by_user_id - Set the operator to _eq - Set the value to X-Hasura-User-Id - Select all columns on Column select permissions - Save

FAQs

Package last updated on 19 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts