
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
react-google-sheets
Advanced tools
Simplely Add Google Sheets API to your react app
npm install --react-google-sheets
or
yarn add react-google-sheets
Use this wizard to create or select a project in the Google Developers Console and automatically turn on the API. Click Continue, then Go to credentials.
On the Add credentials to your project page, click the Cancel button.
At the top of the page, select the OAuth consent screen tab. Select an Email address, enter a Product name if not already set, and click the Save button.
Select the Credentials tab, click the Create credentials button and select OAuth client ID.
Select the application type Other, enter the name "React Google Sheets Quickstart", and click the Create button.
import ReactGoogleSheets from 'react-google-sheets';
class DataComponent extends Component {
constructor(props) {
super(props)
this.state = {
sheetLoaded: false,
}
}
render() {
return (
<ReactGoogleSheets
clientId={YOUR_CLIENT_ID}
apiKey={YOUR_API_KEY}
spreadsheetId={YOUR_SPREADSHEET_ID}
afterLoading={() => this.setState({sheetLoaded: true})}
>
{this.state.sheetLoaded ?
<div>
{/* Access Data */}
{console.log('Your sheet data : ', this.props.getSheetsData({YOUR_SPREADSHEET_NAME}))}
{/* Update Data */}
<button onClick={() => {
this.props.updateCell(
'sheet02', // sheetName
'E', // column
13, // row
'Apple', // value
null, // successCallback
(error) => {
console.log('error', error)
} // errorCallback
);
}}>update cell!</button>
</div>
:
'loading...'
}
</ReactGoogleSheets>
)
}
}
export default ReactGoogleSheets.connect(DataComponent);
That's It!
FAQs
Read and Write data using Google Sheets API in react
The npm package react-google-sheets receives a total of 262 weekly downloads. As such, react-google-sheets popularity was classified as not popular.
We found that react-google-sheets 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.