Gathering detailed insights and metrics for replicache-react
Gathering detailed insights and metrics for replicache-react
Gathering detailed insights and metrics for replicache-react
Gathering detailed insights and metrics for replicache-react
replicache-react-util
@react-native-replicache/react-native-quick-sqlite
> Plug-in React Native compatibility bindings for [Replicache](https://replicache.dev/).
@react-native-replicache/replicache-generic-sqlite
> Plug-in React Native compatibility bindings for [Replicache](https://replicache.dev/).
@react-native-replicache/react-native-expo-sqlite
> Plug-in React Native compatibility bindings for [Replicache](https://replicache.dev/).
Miscellaneous utilities for using Replicache with React
npm install replicache-react
Typescript
Module System
Node Version
NPM Version
76.4
Supply Chain
80.5
Quality
82.2
Maintenance
100
Vulnerability
99.6
License
TypeScript (87.42%)
JavaScript (12.58%)
Total Downloads
893,998
Last Day
131
Last Week
3,846
Last Month
18,675
Last Year
330,059
Apache-2.0 License
24 Stars
78 Commits
9 Forks
4 Watchers
4 Branches
7 Contributors
Updated on Apr 04, 2025
Minified
Minified + Gzipped
Latest Version
5.0.1
Package Id
replicache-react@5.0.1
Unpacked Size
8.17 kB
Size
3.40 kB
File Count
5
NPM Version
8.19.3
Node Version
18.13.0
Published on
Dec 01, 2023
Cumulative downloads
Total Downloads
Last Day
-45.4%
131
Compared to previous day
Last Week
-19.5%
3,846
Compared to previous week
Last Month
-0.6%
18,675
Compared to previous month
Last Year
-25.3%
330,059
Compared to previous year
npm i replicache-react
Build your UI using subscribe()
(or useSubscribe
in React).
Whenever the data in Replicache changes — either due to changes in this tab, another tab, or on the server — the affected UI automatically updates.
Replicache only refires subscriptions when the query results have actually changed, eliminating wasteful re-renders.
React hook that allows you monitor replicache changes
Parameter | Type | Description |
---|---|---|
rep | Replicache | Replicache instance that is being monitored |
query | (tx: ReadTransaction) => Promise | Query that retrieves data to be watched |
def | R | default value returned on first render or whenever query returns undefined |
deps | Array | OPTIONAL: list of dependencies, query will be rerun when any of these change |
example of useSubscribe
in todo app that is watching a specific category
1const {category} = props; 2const todos = useSubscribe( 3 replicache, 4 tx => 5 tx 6 .scan({prefix: `/todo/${category}`}) 7 .values() 8 .toArray(), 9 [], 10 [category], 11); 12 13return ( 14 <ul> 15 {todos.map(t => ( 16 <li>{t.title}</li> 17 ))} 18 </ul> 19);
This release changes the semantics of def
slightly. In previous releases, def
was returned only until query
returned, then useSubscribe
returns query
's result. Now, def
is returned initially, but also if query
returns undefined
.
This is an ergonomic benefit because it avoids having to type the default in two places. Before:
1useSubscribe(r, tx => (await tx.get('count')) ?? 0, 0);
now:
1useSubscribe(r, tx => tx.get('count'), 0);
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 4/26 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
15 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More