Git Product home page Git Product logo

react's Introduction

react's People

Contributors

javierbrea avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react's Issues

Add `useDataLoadedError` hook

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.

Dependency Dashboard

This issue provides visibility into Renovate updates and their statuses. Learn more

This repository currently has no open or pending branches.

Detected dependencies

None detected


  • Check this box to trigger a request for Renovate to run again on this repository

Add except option to usePolling hook

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.

Add usePolling hook

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;

Action Required: Fix Renovate Configuration

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)

Add useLoaded hook

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.