{"repo":"relay-tools/relay-hooks","free":true,"listed":false,"github":"https://github.com/relay-tools/relay-hooks","clone":"git clone https://github.com/relay-tools/relay-hooks.git","description":"Use Relay as React hooks","language":"TypeScript","stars":553,"topics":["react","hooks","relay-modern","graphql","ssr","suspense","usequery","relay-hooks","react-hooks","refetch"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"relay-hooks Use Relay as React hooks Installation Install react-relay and relay-hooks using yarn or npm: Contributing Give a star to the repository and share it , you will help the project and the people who will find it useful Create issues , your questions are a valuable help PRs are welcome , but it is always better to open the issue first so as to help me and other people evaluating it Please sponsor me relay-hooks The initial purpose of the library was to provide the ability to use all react-relay HOCs as react hooks and to implement the store-or-network and store-only policies used by the react-relay-offline library to manage offline relay applications After Relay's core team shared information about the the initial differences in the issue https://github.com/relay-tools/relay-hooks/issues/5, all the necessary changes were made in order to make relay-hooks as close as possible to their specifications. current differences with upcoming Relay Hooks in react-relay useLazyLoadQuery : returns a single data object with the query's data, and nothing else. useFragment : in relay-hooks it is called useSuspenseFragment what's more in relay-hooks useQuery : it is the same as useLazyLoadQuery but does not use suspense, it allows you to use hooks without having to migrate the application in concurrent mode and its return is the same as the QueryRenderer HOC conditional useQuery & useLazyLoadQuery : added skip : [Optional] If skip is true, the query will be skipped entirely observe t","default_branch":null,"files":null,"tree":[],"storefront":"/r/relay-tools","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/relay-tools/relay-hooks/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}