Skip to content

Commit

Permalink
further fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
swyxio authored Jan 3, 2019
1 parent de9d489 commit 2314b12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function App() {
const [isLoading, load] = useLoading();
const [state, setState] = React.useState('you shouldnt see this');
React.useEffect(() => {
load(pingAPI(2000)).then(setState('hello there'));
load(pingAPI(2000)).then(() => setState('hello there'));
});
return isLoading ? <div>Loading</div> : <div>{state}</div>;
}
Expand Down

0 comments on commit 2314b12

Please sign in to comment.