Skip to content

Suited GRPC stub generator powered by Webpack Loader and Typescript Language Service Plugin

Notifications You must be signed in to change notification settings

wickedev/hallow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hallow GRPC

Usage

import { Client } from "@hallow/grpc-web"
import { GreetingStub } from './greeting.proto'

// Setup
const client = new Client({ baseURL: "/api" })
const greeter = new GreetingStub(client)

// Promise
const res = await greeter.greeting()
console.log(JSON.stringify(res))

// React Hooks with Suspense
const hooks = greeter.createHooks()

function Greeter() {
    const res = hooks.useGreeting()
    return <div>{JSON.stringify(res.read())}</div>
}

function App() {
    return <Suspense fallback={'loading'}>
        <ErrorBoundary>
            <Greeter />
        </ErrorBoundary>
    </Suspense>
}

Dependency

  • google-protobuf
  • @improbable-eng/grpc-web

Setup

TBD

About

Suited GRPC stub generator powered by Webpack Loader and Typescript Language Service Plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages