jackyef / react-isomorphic-data

Easily fetch json data in your React components, with similar APIs to react-apollo, and Suspense SSR :tada:

Home Page:https://react-isomorphic-data.netlify.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add TypeScript support

jackyef opened this issue · comments

User of the library should be able to define what they data is going to look like. Something like

interface MyData {
  foo: string;
  bar: number;
}

const { data, error, error } = useData<MyData>(url);

Added in 0.12.5