introduce onReady life-cycle

Summary: Flipper Sandy plugins didn't have an event to hook into that is run _after_ any state snapshot is loaded, which was needed by the graphQL plugin, as they do some post processing when a data snapshot is restored.

Reviewed By: passy

Differential Revision: D28189573

fbshipit-source-id: 4ef992f3fafc32787eab3bc235059f2c41396c80
This commit is contained in:
Michel Weststrate
2021-05-04 12:51:32 -07:00
committed by Facebook GitHub Bot
parent 616341f649
commit dd7a9f5195
5 changed files with 57 additions and 19 deletions

View File

@@ -96,6 +96,7 @@ Some abstractions that used to be (for example) static methods on `FlipperPlugin
| `exportPersistedState` | Use the `client.onExport` hook |
| `getActiveNotifications` | Use `client.showNotification` for persistent notifications, or `message` / `notification` from `antd` for one-off notifications.
| `createTablePlugin` | TBD, so these conversions can be skipped for now |
| `init` | `client.onReady` |
## Using Sandy / Ant.design to organise the plugin UI