An admin-on-rest client for DynamoDb.
npm install aor-dynamodb-client --save
// in src/App.js
import React from 'react';
import { Admin, Resource } from 'admin-on-rest';
import { PostList } from './posts';
import { restClient } from 'aor-dynamodb-client';
const awsConfig = { //optional
region: 'us-east-1'
};
const config = {
tableName: 'some-table-name',
key: 'id', // optional
}
const App = () => (
<Admin restClient={restClient(config, awsConfig)} >
<Resource name="posts" list={PostList} />
</Admin>
);
export default App;
// in src/posts.js
import React from 'react';
import { List } from 'admin-on-rest';
import { Pagination } from 'aor-dynamodb-client';
export const PostList = (props) => (
<List {...props} pagination={<Pagination />}>
...
</List>
);
This library is licensed under the MIT Licence.