open-index/open-npm huggingface dataset:
npm package: @gojilabs/expo-reusable-components
Description: This is a template for a mobile app using Expo Goji reusable components and Gluestack UI.
Latest version: 1.1.0

### Reusable Components Mobile Expo template

This is a template for a mobile app using Expo Goji reusable components and Gluestack UI.

### How to use

To create a new project, run the following command:

```bash
npx create-expo-app@latest --template @gojilabs/expo-reusable-components
```
npm package: @gojilabs/react-google-identity
Description: React hook to handle google identity login
Author: Oleksii Nedilko
Latest version: 1.0.4

# **@gojilabs/react-google-identity**

Simple react hook to handle authentication with Google identity services

## Installation

    npm install @gojilabs/react-google-identity

or

    yarn add @gojilabs/react-google-identity

## Usage

    import { useGoogleIdentity } from '@gojilabs/react-google-identity'
    ...

    const MyComponent:FC = () => {
        const { buttonRef, ready } = useGoogleIdentity({ clientId: YOUR_GOOGLE_CLIENT_ID, callback: googleCallback })
    ...

        return <div ref={buttonRef} />
    }

Hook takes config object, where you should pass YOUR_GOOGLE_CLIENT_ID, and callback,
which will be fired when you complete google sign-in.

#### !!!WARNING

Since _callback_ will be used as useEffect dependency,
it should be wrapped with useCallback hook.

useGoogleIdentity returns object, with properties:

- _buttonRef_ - react ref, should be passed to div, where login button should be placed
- _ready_ - boolean flag, which represents whether google identity script was loaded or not