0.0.3 • Published 4 years ago

flipper-client-sdk v0.0.3

Weekly downloads
2,331
License
MIT
Repository
github
Last release
4 years ago

flipper-sdk-api

SDK to build Flipper clients for JS based apps

Installation

yarn add flipper-client-sdk

Usage

Example

class SeaMammalPlugin extends AbsctractFlipperPlugin {
  getId(): string {
    return 'sea-mammals';
  }

  runInBackground(): boolean {
    return true;
  }

  newRow(row: {id: string, url: string, title: string}) {
    this.connection?.send("newRow", row)
  }
}

const flipperClient = newWebviewClient();
cosnt plugin = new SeaMammalPlugin();
flipperClient.addPlugin();
flipperClient.start('Example JS App');
plugin.newRow({id: '1', title: 'Dolphin', url: 'example.com'})
0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago