Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
src
.babelrc
README.md
package.json
yarn.lock

README.md

worker-rpc

Transparent typed client-worker interaction via effects and effector/babel-plugin

common

import {createDomain} from 'effector'
export const api = createDomain()

export const exampleEffect = api.effect()

worker:

import {exampleEffect} from './common'

exampleEffect.use(message => {
  console.log('message from client: ', message)
  return 'hello client'
})

client:

import {exampleEffect} from './common'

await exampleEffect('hello worker')
// => message from client: hello worker
// => hello client
You can’t perform that action at this time.