ilyalesik/react-fetch-hook

README typo misleading

chasm opened this issue · 1 comments

chasm commented
const {authToken} = useContext(authTokenContext);
const [someState, setSomeState] = useState(false);
const { isLoading, data } = useFetch("https://swapi.co/api/people/1", {
    depends: [!!authToken, someState] //don't call request, if haven't authToken and someState: false
});

The above should read: don't call request, if haven't authToken OR someState: false. Unless I've misunderstood.

Great, thanks!