
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@electric-sql/react
Advanced tools
Electric is Postgres sync for modern apps.
Electric provides an HTTP interface to Postgres to enable massive number of clients to query and get real-time updates to data in "shapes" i.e. subsets of the database. Electric turns Postgres into a real-time database.
This packages exposes a useShape hook for pulling shape data into your React components.
Shapes and ShapeStreams instances are cached globally so re-using shapes in multiple components is cheap.
npm i @electric-sql/react
Add useShape to a component
import { useShape } from '@electric-sql/react'
export default function MyComponent() {
const { isLoading, data } = useShape({
url: 'http://my-api.com/shape',
params: {
table: `foo`,
},
})
if (isLoading) {
return <div>loading</div>
}
return (
<div>
{data.map((foo) => (
<div>{foo.title}</div>
))}
</div>
)
}
FAQs
React hooks for ElectricSQL
The npm package @electric-sql/react receives a total of 12,699 weekly downloads. As such, @electric-sql/react popularity was classified as popular.
We found that @electric-sql/react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.