keajs / kea-waitfor

Wait for actions with a promise

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NPM Version minified minified + gzipped Backers on Open Collective Sponsors on Open Collective

kea-waitfor

Promise that waits for an action

What and why?

Use in tests or with SSR to wait for a specific action

Getting started

Add the package:

yarn add kea-waitfor

... then add it to kea's plugins list:

import { waitForPlugin } from 'kea-waitfor'

resetContext({
  plugins: [waitForPlugin]
})

Sample usage

Read the documentation

About

Wait for actions with a promise

License:MIT License


Languages

Language:JavaScript 53.7%Language:TypeScript 46.3%