From 819cb4342cb729314eabe03484cec0ac29e4d3f5 Mon Sep 17 00:00:00 2001 From: Andrey Goncharov Date: Thu, 15 Sep 2022 10:02:19 -0700 Subject: [PATCH] Promote using ESM instead CJS with createTablePlugin Summary: Mixing CJS and ESM confuses esbuild Reviewed By: lawrencelomax Differential Revision: D39467716 fbshipit-source-id: 84273eb8c1c7e45a16da979d0fbd0a7f7df8828b --- docs/tutorial/js-table.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/tutorial/js-table.mdx b/docs/tutorial/js-table.mdx index 6bdbe5c24..abf80a5bc 100644 --- a/docs/tutorial/js-table.mdx +++ b/docs/tutorial/js-table.mdx @@ -62,11 +62,12 @@ You now have a Row type that describes the data you'll be storing and a descript ```typescript import {DataTableColumn, createTablePlugin} from 'flipper-plugin'; -module.exports = createTablePlugin({ +const {plugin, Component} = createTablePlugin({ columns, method: 'newRow', key: 'id', }); +export {plugin, Component}; ``` The above code snippet has the following properties: