Research
Security News
Malicious PyPI Package ‘pycord-self’ Targets Discord Developers with Token Theft and Backdoor Exploit
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
@lessondesk/react-table-context
Advanced tools
Flexible Table Provider & Consumer
import React from 'react'
import ReactDOM from 'react-dom'
import createTableContext from './react-table-context'
const Table = () => {
const [Provider, Consumer] = createTableContext(async args => {
console.log('args', args)
const response = await fetch('https://jsonplaceholder.typicode.com/todos')
const json = await response.json()
return {
meta: {
count: json.length
},
data: json
}
})
return <Provider>
<div>
<h1>Example Table</h1>
<Consumer>
{({
page, // 0
pageSize, // 10
firstPage, // true
isLoading, // false
isEmpty, // false
data, // Array[100]
meta, // Object
error, // null
filters, // Object
unappliedFilters, // Object
sorting, // Object
pageData, // Array[10]
selected, // Array[0]
search, //
setSearch, // function () {}
setPage, // function () {}
setSorting, // function () {}
setPageSize, // function () {}
refresh, // function () {}
setSelected, // function () {}
toggleSelectAll, // function () {}
setFilters, // function () {}
setUnappliedFilters, // function () {}
applyFilters // function () {}
}) => {
console.log('data', data)
return <table>
<thead>
<tr>
<th>ID</th>
<th>Title</th>
<th>Completed</th>
</tr>
</thead>
<tbody>
{pageData.map(({ id, title, completed }) => {
return <tr key={id}>
<td>{id}</td>
<td>{title}</td>
<td>{completed ? 'Yes' : 'Nope'}</td>
</tr>
})}
</tbody>
</table>
}}
</Consumer>
</div>
</Provider>
}
function App () {
return (
<div className='App'>
<Table />
</div>
)
}
const rootElement = document.getElementById('root')
ReactDOM.render(<App />, rootElement)
This project uses node and npm.
$ npm install @lessondesk/react-table-context
$ # OR
$ yarn add @lessondesk/react-table-context
git checkout -b my-new-feature
git commit -am "Add some feature"
git push origin my-new-feature
MIT
FAQs
Flexible Table Provider & Consumer
The npm package @lessondesk/react-table-context receives a total of 20 weekly downloads. As such, @lessondesk/react-table-context popularity was classified as not popular.
We found that @lessondesk/react-table-context demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.