Skip to content

client-react 0.0.0-c88453d

Install from the command line:
Learn more about npm packages
$ npm install @Workgrid/client-react@0.0.0-c88453d
Install via package.json:
"@Workgrid/client-react": "0.0.0-c88453d"

About this version

Workgrid Client React

Latest version

Installation

$ npm install @workgrid/client-react

Usage

import 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


Assets

  • client-react-0.0.0-c88453d.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0