useDataClient
Example usage:
import { preloadData, useDataClient } from 'react-isomorphic-data';const Component = () => {const client = useDataClient();const handleClick = () => {preloadData(client, 'http://localhost:3000/rest-api');}return <div>Something</div>}
The returned value of useDataClient() are:
client: DataClientA
DataClientinstance, similar to what is created viacreateDataClient(). Can be passed topreloadDatato implement render-as-you-fetch pattern