1.0.1 • Published 6 years ago

aor-dynamodb-client v1.0.1

Weekly downloads
4
License
ISC
Repository
github
Last release
6 years ago

aor-dynamodb-client

An admin-on-rest client for DynamoDb.

Installation

npm install aor-dynamodb-client --save

Usage

// 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>
);

License

This library is licensed under the MIT Licence.

1.0.1

6 years ago

1.0.0

6 years ago