@nhost/react-apollo
v15.0.0
Published
Nhost React Apollo client
Downloads
2,103
Readme
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')
)