Nunchaku Pizza Master

    @nhost/react
    TypeScript icon, indicating that this package has built-in type declarations

    0.15.2 • Public • Published

    Nhost React

    The Nhost React client exports a React provider, hooks, and helpers that make it easier to work with Nhost in your React app. If you're using React with Next.js, you should use the Nhost Next.js client.

    Documentation

    Install

    Install the Nhost React client together with GraphQL:

    # With npm
    npm install @nhost/react graphql
    
    # With Yarm
    yarn add @nhost/react graphql

    Initialise

    Initialize a single nhost instance and wrap your app with the NhostReactProvider.

    import React from 'react'
    import ReactDOM from 'react-dom'
    
    import { NhostClient, NhostReactProvider } from '@nhost/react'
    
    import App from './App'
    
    const nhost = new NhostClient({
      subdomain: '<Your Nhost app subdomain>',
      region: '<Your Nhost app region>'
    })
    
    ReactDOM.render(
      <React.StrictMode>
        <NhostReactProvider nhost={nhost}>
          <App />
        </NhostReactProvider>
      </React.StrictMode>,
      document.getElementById('root')
    )

    Install

    npm i @nhost/react

    Homepage

    nhost.io

    DownloadsWeekly Downloads

    2,517

    Version

    0.15.2

    License

    MIT

    Unpacked Size

    1.23 MB

    Total Files

    95

    Last publish

    Collaborators

    • pilou
    • elitan
    • nunopato