Update docs for JS only plugins

Summary: Added docs on how to write React-Native JavaScript based plugins

Reviewed By: passy

Differential Revision: D19344803

fbshipit-source-id: ad1ea66f1031760729fdaea8a7e6c1ef5dcd5439
This commit is contained in:
Michel Weststrate
2020-01-23 07:09:51 -08:00
committed by Facebook Github Bot
parent e306aeb010
commit 426d17b08d
6 changed files with 134 additions and 2 deletions

View File

@@ -3,6 +3,12 @@ id: js-plugin-api
title: JavaScript Plugin API
---
<div class="warning">
This page describes the JavaScript API that is used to implement plugins inside the Flipper Desktop application. For the JavaScript API that can be used inside React Native to communicate with the Flipper Desktop, see [Client Plugin API](create-plugin).
</div>
Provided a plugin is setup as defined in [JS Plugin Definiton](js-setup), the basic requirement of a Flipper plugin is that `index.tsx` exports a default class that extends `FlipperPlugin`.
`FlipperPlugin` is an extension of `React.Component` with extra Flipper-related functionality. This means to define the UI of your plugin, you just need to implement this React component.