
Product
Introducing Reports: An Extensible Reporting Framework for Socket Data
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.
@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 7,947 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.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.