You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 29, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@
6
6
7
7
# [![Data Provider][logo]][home]
8
8
9
-
> Async Data Provider. Powered by Redux. Agnostic about data origins. Framework agnostic.
9
+
> Async Data Provider. Powered by Redux. Agnostic about data origins. Agnostic about UI Frameworks.
10
10
11
-
Data Provider is a data provider _(surprise!)_ with states ands built-in cache for JavaScript apps.
11
+
Data Provider is a data provider _(surprise!)_ with states and built-in cache for JavaScript apps.
12
12
13
13
The main target of the library are front-end applications, but it could be used also in [Node.js][nodejs].
14
14
@@ -19,7 +19,7 @@ As its states are managed with [Redux][redux], you can take advantage of his lar
19
19
20
20
You can use Data Provider with [React][react], or with any other view library. [Separated addons][addons] are available for that purpose, as [@data-provider/react][data-provider-react].
21
21
22
-
Data Provider is __agnostic about data origins__, so it can be used to read data from a REST API, from localStorage, or from any other origin. Choose one of the [available addons][addons] depending of the type of the origin you want to read from, as [@data-provider/axios][data-provider-axios], or [@data-provider/browser-storage][data-provider-browser-storage].
22
+
Data Provider is __agnostic about data origins__, so it can be used to read data from a REST API, from `localStorage`, or from any other origin. Choose one of the [available addons][addons] depending of the type of the origin you want to read from, as [`@data-provider/axios`][data-provider-axios], or [`@data-provider/browser-storage`][data-provider-browser-storage].
23
23
24
24
It has a __light weight__, 4.2KB gzipped in UMD format _(you have to add the Redux weight to this)_, and addons usually are even lighter.
25
25
@@ -40,7 +40,7 @@ We have a website available to help you to learn to use Data Provider. There are
40
40
41
41
### Agnostic about data origins
42
42
43
-
The Provider class provides the cache, state handler, etc., but not the "read" method. The "read" behavior is implemented by __different [Data Provider Origins addons][addons]__.
43
+
The Provider class provides the cache, state handler, etc., but not the `read` method. The `read` behavior is implemented by __different [Data Provider Origins addons][addons]__.
44
44
45
45
There are different origins addons available, such as __[Axios][data-provider-axios], [LocalStorage][data-provider-browser-storage], [Memory][data-provider-memory], etc.__ and building your own is so easy as extending the Provider class with a custom "readMethod".
Providers and selectors instances can be queried, which returns a new child instance with his own "query value".
119
+
Providers and selectors instances can be queried, which returns a new child instance with its own `query value`.
120
120
121
121
Each different child has a different cache, different state, etc.
122
122
123
-
Different origins can use the "query" value for different purposes (API origins will normally use it for adding different params or query strings to the provider url, for example)
123
+
Different origins can use the `queryValue` for different purposes (API origins will normally use it for adding different params or query strings to the provider url, for example)
124
124
125
125
When the parent provider cache is clean, also the children is. _(For example, cleaning the cache of an API origin requesting to "/api/books", will also clean the cache for "/api/books?author=2")_
126
126
@@ -148,11 +148,11 @@ export default Book;
148
148
149
149
Data Provider is not concerned about the views, but UI binding addons are available.
150
150
151
-
For example, the [@data-provider/react][data-provider-react] package __gives you hooks to easily retrieve and provide data and other data-provider states to your components__,
151
+
For example, the [@data-provider/react][data-provider-react] package __gives you hooks to easily retrieve and provide data__ and other data-provider states to React components.
152
152
153
-
It also provides __HOCs like "withData", "withLoading", etc., creating a wrapper component handling all the logic for you.__
153
+
It also provides __HOCs__ like "withData", "withLoading", etc. creating a wrapper component handling all the logic for you.
154
154
155
-
__Optimized__, it takes care of reading the data and re-renders the component only when the provider desired props have changed. It also takes care of reading the data again every time the cache of the provider is invalidated.
155
+
__Optimized__, it takes care of reading the data and re-renders the component only when the provider desired properties have changed. It also takes care of reading the data again every time the cache of the provider is invalidated.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
0 commit comments