Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
react-dynamodb-helper
Advanced tools
A helper component to interface with dynamodb using the AWS SDK, directly from React
A helper component to interface with dynamodb using the AWS SDK, directly from React
npm install --save react-dynamodb-helper
Then install the dependencies.
npm install --save aws-sdk
You will need to create table(s) in dynamodb according to your data model.
AWS region, secret and access key form the credentials. These are required to use this package. It is crucial that these credentials are given create, retrieve, update and delete permissions in aws for dynamodb.
You can now review the functionality below.
/*
region: aws region
secret: aws secret
key: aws access key
params: query parameters
*/
getData(region, secret, key, params) {}
queryData(region, secret, key, params) {}
scanData(region, secret, key, params) {}
putData(region, secret, key, params) {}
updateData(region, secret, key, params) {}
deleteData(region, secret, key, params) {}
import React, { useEffect } from 'react'
import * as DynamoDB from 'react-dynamodb-helper';
const App = () => {
useEffect(() => {
async function getData() {
var params = {
TableName: "Account_Credentials",
Key : {
"email" : 'hru****@***ies.com',
}
};
// aws_secret and aws_access_key need to have
// dynamodb access
let result = await DynamoDB.getData("aws_region", "aws_secret", "aws_access_key", params)
}
getData();
}, [])
useEffect(() => {
async function updateData() {
var params = {
TableName: "Account_Credentials",
Key : {
"email" : 'hru****@***ies.com',
},
UpdateExpression: "set #otp = :otpVal",
ExpressionAttributeNames: {
"#otp": "otp",
},
ExpressionAttributeValues: {
":otpVal": "1212"
}
};
// aws_secret and aws_access_key need to have
// dynamodb access
let result = await DynamoDB.updateData("aws_region", "aws_secret", "aws_access_key", params)
}
getData();
}, [])
return <div>Hello DynamoDB Helper</div>
}
export default App
MIT © superflows-dev
FAQs
A helper component to interface with dynamodb using the AWS SDK, directly from React
The npm package react-dynamodb-helper receives a total of 11 weekly downloads. As such, react-dynamodb-helper popularity was classified as not popular.
We found that react-dynamodb-helper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.