โ WARNING
This package has been migrated to the@data-provider
monorepo: https://github.com/data-provider/core/tree/master/packages/react
data-provider / react Goto Github PK
View Code? Open in Web Editor NEWReact bindings for @data-provider
React bindings for @data-provider
โ WARNING
This package has been migrated to the@data-provider
monorepo: https://github.com/data-provider/core/tree/master/packages/react
The useDataProvider
hook only returns [data, loading, error]
state properties, and you need to use useLoaded
separately if you want to use the loaded
one. It is desirable to add a new useDataLoadedError
hook, and add a new alias for the useDataProvider
one named useDataLoadingError
. So you can decide easily if you use the loading
or loaded
property of the state simply using one hook or another.
HOCs should expose all original non react component statics
This issue provides visibility into Renovate updates and their statuses. Learn more
This repository currently has no open or pending branches.
None detected
When using the except
option in the usePolling
hook, it is not passed to the first invocation of the cleanCache
method.
It is desirable to add an option to the usePolling
hook to allow the usage of the data-provider except
option of the cleanDependenciesCache
method.
Inspired by the use case described in data-provider/core#79, it would be very useful to have a usePolling
hook, which should clean the cache of a connected provider while the component is rendered (or all the dependencies caches in case of the provider is a Selector).
It is necessary to handle possible "pollings" of the same provider in a unified way in order to avoid multiple components calling to the cleanCache
method at different intervals. In that case, the applied interval should be the lower one of the intervals required by all concurrent components.
Based on the code example in the referred issue, the code using this hook would look like:
import React, { useEffect } from "react";
import { useData, usePolling } from "@data-provider/react";
import { booksWithAuthorName } from "../data/books";
const Books = () => {
const books = useData(booksWithAuthorName);
usePolling(booksWithAuthorName, 1000);
// books and authors will be requested again every 1000 miliseconds, and this component will be re-rendered each time new data is retrieved.
return (
<ul>
{
books.map((book) => {
return (
<li key={`book-${book.id}`}>{book.title} - {book.authorName}</li>
);
});
}
</ul>
);
};
export default Books;
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: Cannot find preset's package (github>whitesource/merge-confidence:beta)
Data provider core v2.3.0 added a new property to the state called "loaded", as described in data-provider/core#81. It is desirable to add a new hook called useLoaded
to take advantage of this new feature.
Travis CI is no longer free: https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing, so builds has to be migrated to a new CI, for instance GitHub Actions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.