-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.readme.hbs
168 lines (132 loc) · 4.16 KB
/
.readme.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
[![Version](https://img.shields.io/npm/v/react-store-context-hooks)](https://bit.ly/3CrKTGs)
[![Downloads](https://img.shields.io/npm/dt/react-store-context-hooks)](https://bit.ly/3CrKTGs)
<!---
[![Dependency Status](https://img.shields.io/david/rickypc/react-store-context-hooks)](https://bit.ly/2XIejB8)
[![Dev Dependency Status](https://img.shields.io/david/dev/rickypc/react-store-context-hooks)](https://bit.ly/3mbPI1a)
-->
[![Code Style](https://img.shields.io/badge/code%20style-Airbnb-red)](https://bit.ly/2JYN1gk)
[![Build](https://img.shields.io/github/workflow/status/rickypc/react-store-context-hooks/Validations)](https://bit.ly/2XL1lCJ)
[![Coverage](https://img.shields.io/codecov/c/github/rickypc/react-store-context-hooks)](https://bit.ly/3bd4kam)
[![Vulnerability](https://img.shields.io/snyk/vulnerabilities/github/rickypc/react-store-context-hooks)](https://bit.ly/3bhs0Kp)
<!---
[![Dependabot](https://api.dependabot.com/badges/status?host=github&repo=rickypc/react-store-context-hooks)](https://bit.ly/2KIM5vs)
-->
[![License](https://img.shields.io/npm/l/react-store-context-hooks)](https://mzl.la/2vLmCye)
React Store Context Hooks
=========================
Provides various data store hooks that allow functional components to share
the application state within the same React Context or different React Context
using persistent storage.
CDN Link
-
```html
<script crossorigin src="https://unpkg.com/react-store-context-hook/index.umd.js"></script>
```
Node.js Installation
-
```bash
$ yarn add react-store-context-hooks
# or
$ npm install --save react-store-context-hooks
```
API Reference
-
{{#module name="react-store-context-hooks"}}
{{>body~}}
{{>member-index~}}
{{>separator~}}
{{>members~}}
{{/module}}
Development Dependencies
-
You will need to install [Node.js](https://bit.ly/2SMCGXK) as a local
development dependency. The `npm` package manager comes bundled with all
recent releases of `Node.js`. You can also use [yarn](https://bit.ly/3nmWS1K)
as a package manager.
`yarn` or `npm install` will attempt to resolve any `npm` module dependencies
that have been declared in the project’s `package.json` file, installing them
into the `node_modules` folder.
```bash
$ yarn
# or
$ npm install
```
Run Benchmark, Flow, Leak, Lint, and Unit Tests
-
To make sure we did not break anything, let's run all the tests:
```bash
$ yarn test
# or
$ npm run test:lint; npm run test:flow; npm run test:unit; npm run test:bench; npm run test:leak
```
Run benchmark tests only:
```bash
$ yarn test:bench
# or
$ npm run test:bench
```
Run static type tests only:
```bash
$ yarn test:flow
# or
$ npm run test:flow
```
Run leak tests only:
```bash
$ yarn test:leak
# or
$ npm run test:leak
```
Run lint tests only:
```bash
$ yarn test:lint
# or
$ npm run test:lint
```
Run unit tests only:
```bash
$ yarn test:unit
# or
$ npm run test:unit
```
Run Budles, Documentation, and Typescript definition Builds
-
To generate distribution bundles, documentation, and Typescript definition, run:
```bash
$ yarn build
# or
$ npm run build:docs; npm run build:bundles; npm run build:ts
```
Run bundles build only:
```bash
$ yarn build:bundles
# or
$ npm run build:bundles
```
Run documentation build only:
```bash
$ yarn build:docs
# or
$ npm run build:docs
```
Run Typescript definition build only:
```bash
$ yarn build:ts
# or
$ npm run build:ts
```
Contributing
-
If you would like to contribute code to React Store Context Hooks repository,
you can do so through GitHub by forking the repository and sending a pull request.
If you do not agree to [Contribution Agreement](CONTRIBUTING.md), do not
contribute any code to React Store Context Hooks repository.
When submitting code, please make every effort to follow existing conventions
and style in order to keep the code as readable as possible. Please also include
appropriate test cases.
That's it! Thank you for your contribution!
License
-
Copyright (c) 2019 - 2021 Richard Huang.
This utility is free software, licensed under: [Mozilla Public License (MPL-2.0)](https://mzl.la/2vLmCye).
Documentation and other similar content are provided under [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://bit.ly/2SMCRlS).