client-react 0.0.0-752f285
Install from the command line:
Learn more about npm packages
$ npm install @Workgrid/client-react@0.0.0-752f285
Install via package.json:
"@Workgrid/client-react": "0.0.0-752f285"
About this version
$ npm install @workgrid/client-reactimport React from 'react'
import WorkgridClient from '@workgrid/client'
import { WorkgridProvider, useQuery } from '@workgrid/client-react'
const client = new WorkgridClient({ ... })
function Notifications({ location }) {
const { data: notifications } = useQuery(['getNotifications', { location }])
return (
<ul>
{notifications.map(notification => (
<li key={notification.id}>
...
</li>
))}
</ul>
)
}
function App() {
return (
<WorkgridProvider client={client}>
<Notifications location="toknow" />
</WorkgridProvider>
)
}Details
- client-react
-
Workgrid
- over 2 years ago
- ISC
- 8 dependencies
Assets
- client-react-0.0.0-752f285.tgz
Download activity
- Total downloads 0
- Last 30 days 0
- Last week 0
- Today 0