How to use the react-fetching-library.useSuspenseQuery function in react-fetching-library

To help you get started, we’ve selected a few react-fetching-library examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github marcin-piela / react-fetching-library / examples / use-suspense-query-hook / src / usersList / UsersListContainer.tsx View on Github external
export const UsersListContainer = () => {
  const { payload, error } = useSuspenseQuery(fetchUsersList);

  return ;
};
github marcin-piela / react-fetching-library / examples / use-suspense-query-hook / src / newsList / NewsListContainer.tsx View on Github external
export const NewsListContainer = () => {
  const { payload, error, query } = useSuspenseQuery(fetchNewsList);

  return (
    <div>
      <button color="primary">
        Click to reload
      </button>

      
    </div>
  );
};

react-fetching-library

Simple and powerful API client for react. Use hooks or FACC's to fetch data in easy way. No dependencies! Just react under the hood.

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis