Created
May 8, 2021 22:37
-
-
Save Mohammad-Faisal/04801f199b3f7536bc8d82befd2b5931 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {fetchData , putData} from './AwsFunctions'; | |
export default const App = () => { | |
const fetchDataFormDynamoDb = async () => { | |
await fetchData('users') | |
} | |
const addDataToDynamoDB = async () => { | |
const userData = { | |
name:"Faisal", | |
age:"170" | |
} | |
await putData('users' , userData) | |
} | |
return <> | |
<button onClick={() => fetchDataFormDynamoDb()}> Fetch </button> | |
<button onClick={() => addDataToDynamoDB()}> Put </button> | |
</> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment