Gathering detailed insights and metrics for redux-bundler-preact
Gathering detailed insights and metrics for redux-bundler-preact
Gathering detailed insights and metrics for redux-bundler-preact
Gathering detailed insights and metrics for redux-bundler-preact
npm install redux-bundler-preact
Typescript
Module System
Node Version
NPM Version
70.3
Supply Chain
85
Quality
77.4
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
93,386
Last Day
94
Last Week
316
Last Month
1,217
Last Year
37,214
7 Stars
17 Commits
1 Forks
3 Watchers
8 Branches
2 Contributors
Updated on Jun 10, 2023
Minified
Minified + Gzipped
Latest Version
2.0.1
Package Id
redux-bundler-preact@2.0.1
Unpacked Size
10.07 kB
Size
3.61 kB
File Count
10
NPM Version
6.13.1
Node Version
12.13.0
Cumulative downloads
Total Downloads
Last Day
-29.3%
94
Compared to previous day
Last Week
-26.9%
316
Compared to previous week
Last Month
-57.8%
1,217
Compared to previous month
Last Year
18.3%
37,214
Compared to previous year
1
6
Bindings for redux-bundler to Preact
Install v2 for Preact >=10.0.0:
npm install redux-bundler-preact
Install v1 for Preact v3-8:
npm install redux-bundler-preact@^1
Similar to react-redux, or preact-redux this has two exports, Provider
and connect
.
Provider
puts the store into the context
so that connected components can get access to it:
1import { connect, Provider } from 'redux-bundler-preact' 2import getStore from './bundles' 3import AppRoot from './app-root' 4 5export default () => ( 6 <Provider store={getStore()}> 7 <AppRoot /> 8 </Provider> 9)
connect
works a bit differently for redux-bundler than you may be used to. You pass it the string names of the selectors and action creators you want to grab from the store. The last argument should always be the component itself.
1import { connect } from 'redux-bundler-preact' 2 3const MyComponent = ({ myValue, myOtherValue, doInitiateSignIn }) => ( 4 <div onClick={doInitiateSignIn}> 5 {myValue} {myOtherValue} 6 </div> 7) 8 9// Here we use `connect()` to specify which selector values and action creators 10// that we want to use. 11// Note that it is quite inexpensive to connect many components since the diffing 12// happens outside of the component entirely. 13// If you try to connect something that doesn't exist, it will error at runtime 14// for easier debugging 15export default connect( 16 'selectMyValue', 17 'selectMyOtherValue', 18 'doInitiateSignIn', 19 MyComponent 20)
If you like this follow @HenrikJoreteg on twitter.
Big thanks to @swashcap for his contributions.
2.0.1
- update deps for security patches2.0.0
- upgrade to preact X1.x
- preact 8 and lowerNo vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 2/8 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
31 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
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