Promote using ESM instead CJS with createTablePlugin

Summary: Mixing CJS and ESM confuses esbuild

Reviewed By: lawrencelomax

Differential Revision: D39467716

fbshipit-source-id: 84273eb8c1c7e45a16da979d0fbd0a7f7df8828b
This commit is contained in:
Andrey Goncharov
2022-09-15 10:02:19 -07:00
committed by Facebook GitHub Bot
parent 62bb4df8d7
commit 819cb4342c

View File

@@ -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<Row>({
const {plugin, Component} = createTablePlugin<Row>({
columns,
method: 'newRow',
key: 'id',
});
export {plugin, Component};
```
The above code snippet has the following properties: