diff --git a/README.md b/README.md index 1a831ed..e23371d 100644 --- a/README.md +++ b/README.md @@ -36,14 +36,7 @@ const MoviesEndpoint: Endpoint = { type MoviesResponse = Movie[]; function App() { - const [movies, { data, loading }] = useRequest(MoviesEndpoint); - - React.useEffect( - () => { - movies(); - }, - [movies] - ); + const { data, loading } = useRequest(MoviesEndpoint); return !data ? (
{ loading ? 'Loading...' : 'Something went wrong' }
diff --git a/package.json b/package.json index 85b7b82..610c650 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-rest-request", - "version": "0.3.0", + "version": "0.3.1", "description": "Minimalistic REST API client for React inspired by Apollo", "readme": "README.md", "main": "./target/index.js",