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

11.0.1 • Public • Published

@nhost/react-apollo

For easy usage of Apollo and React

npm npm license: MIT

Documentation

Reference documentation

Install

$ npm install @nhost/react-apollo @nhost/react @apollo/client graphql react react-dom

or

$ yarn add @nhost/react-apollo @nhost/react @apollo/client graphql react react-dom

Usage

import React from 'react'
import ReactDOM from 'react-dom'
import { NhostClient, NhostReactProvider } from '@nhost/react'
import { NhostApolloProvider } from '@nhost/react-apollo'

import App from './App'

const nhost = new NhostClient({
  subdomain: '<Your Nhost project subdomain>',
  region: '<Your Nhost project region>'
})

ReactDOM.render(
  <React.StrictMode>
    <NhostReactProvider nhost={nhost}>
      <NhostApolloProvider nhost={nhost}>
        <App />
      </NhostApolloProvider>
    </NhostReactProvider>
  </React.StrictMode>,
  document.getElementById('root')
)

/@nhost/react-apollo/

    Package Sidebar

    Install

    npm i @nhost/react-apollo

    Homepage

    nhost.io

    Weekly Downloads

    841

    Version

    11.0.1

    License

    MIT

    Unpacked Size

    35.6 kB

    Total Files

    15

    Last publish

    Collaborators

    • nunopato