Gathering detailed insights and metrics for react-store-context
Gathering detailed insights and metrics for react-store-context
Gathering detailed insights and metrics for react-store-context
Gathering detailed insights and metrics for react-store-context
react-context-hooks-store
A simple global store based on React Context and Hooks
react-context-store
A two way binding solution that uses React context as a storage mechanism.
@snolly/context-store
Redux like store with the ability to save data to persistent storage
@fishbot/store-context
State Management with React Context and Hooks
npm install react-store-context
Typescript
Module System
Node Version
NPM Version
TypeScript (84.21%)
JavaScript (15.79%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
1 Stars
21 Commits
1 Forks
2 Watchers
24 Branches
2 Contributors
Updated on Oct 20, 2024
Latest Version
2.0.1
Package Id
react-store-context@2.0.1
Unpacked Size
10.56 kB
Size
4.55 kB
File Count
5
NPM Version
6.11.0
Node Version
10.14.2
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
A simple store API using React Context
yarn add react-store-context
Make sure React 16, at version 16.3.0 or higher, is installed alongside react-store-context.
1import * as React from 'react'; 2import { render } from 'react-dom'; 3import { createStore, Provider } from 'react-store-context'; 4 5interface CheckboxProps { 6 checked: boolean; 7 label: string; 8 setChecked(checked: boolean): void; 9} 10 11const Checkbox: React.FunctionComponent<CheckboxProps> = props => { 12 return ( 13 <label 14 style={{ 15 display: 'block', 16 userSelect: 'none' 17 }} 18 > 19 <input 20 type='checkbox' 21 checked={props.checked} 22 onChange={() => { 23 props.setChecked(!props.checked); 24 }} 25 style={{ 26 marginRight: 8, 27 }} 28 /> 29 {props.label} 30 </label> 31 ); 32}; 33 34const storeA = createStore({ 35 checked: false, 36}); 37 38const storeB = createStore({ 39 checked: false, 40}); 41 42const App: React.FunctionComponent = () => { 43 return ( 44 <Provider stores={[storeA, storeB]}> 45 <storeA.Consumer> 46 {({ state, setState }) => { 47 return ( 48 <Checkbox 49 checked={state.checked} 50 label='Store A' 51 setChecked={checked => { 52 setState({ 53 checked, 54 }); 55 }} 56 /> 57 ); 58 }} 59 </storeA.Consumer> 60 <storeB.Consumer> 61 {({ state, setState }) => { 62 return ( 63 <Checkbox 64 checked={state.checked} 65 label='Store B' 66 setChecked={checked => { 67 setState({ 68 checked, 69 }); 70 }} 71 /> 72 ); 73 }} 74 </storeB.Consumer> 75 </Provider> 76 ); 77}; 78 79render(<App />, document.getElementById('root')); 80
yarn storybook
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 1/21 approved changesets -- score normalized to 0
Reason
project is archived
Details
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
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
106 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
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