Update public docs to use Sandy
Summary: This updates the docs of Flipper to use Sandy, rather than `FlipperPlugin` class. Restructured the docs a bit as a result. Reviewed By: passy Differential Revision: D24991285 fbshipit-source-id: 66d5760c25cf9cf3983515433dfd64348d51db3d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
da6d6593a5
commit
cc438e60ad
@@ -10,7 +10,7 @@ type Events = {
|
||||
newData: Data;
|
||||
};
|
||||
|
||||
// Read more: https://fbflipper.com/docs/extending/desktop-plugins#creating-a-first-plugin
|
||||
// Read more: https://fbflipper.com/docs/tutorial/js-custom#creating-a-first-plugin
|
||||
// API: https://fbflipper.com/docs/extending/flipper-plugin#pluginclient
|
||||
export function plugin(client: PluginClient<Events, {}>) {
|
||||
const data = createState<Record<string, Data>>({}, {persist: 'data'});
|
||||
@@ -31,7 +31,7 @@ export function plugin(client: PluginClient<Events, {}>) {
|
||||
return {data};
|
||||
}
|
||||
|
||||
// Read more: https://fbflipper.com/docs/extending/desktop-plugins#building-a-user-interface-for-the-plugin
|
||||
// Read more: https://fbflipper.com/docs/tutorial/js-custom#building-a-user-interface-for-the-plugin
|
||||
// API: https://fbflipper.com/docs/extending/flipper-plugin#react-hooks
|
||||
export function Component() {
|
||||
const instance = usePlugin(plugin);
|
||||
|
||||
Reference in New Issue
Block a user