I'm trying to work out how to change the behaviour of an existing hook, specifically the useAsync hook provided by the react-async library. It's a hook for making async requests to an API.
I'd like to change the behaviour of the hook in a number of…
I'm fetching list of orders containing delivery vehicle's current location and order's destination and storing list in Redux Store.
Currently I've implement distance matrix service in a component and executing it in App.js file and passing each…
I am trying to run a fetch request later by using useFetch from the React-Async library. I would like to run it in an effect hook.
import React, {useEffect} from 'react';
import { useFetch } from "react-async"
const Example = (props) => {
const…
I have a React component that fetches some data from IndexedDB that is an asynchronous task it uses the id from the url passed in by the useParams hook let say id = 1.
When I click on the link in the example the id changes to 2 but at this point…
Invalid hook call. Hooks can only be called inside of the body of a function component.
I am trying to create a hook to load options in react-select. Here's my code -
import React, { useEffect } from "react";
import { useDispatch } from…
I just updated to the newest version of react-async (8.0.0) and the new promise prop is giving me some trouble.
I'm trying to use the promise prop after my useAsync hook, as described in the release notes, but I'm getting a runtime error "TypeError:…
I've only been using JS and React for a short time, and am running into issues with waiting for a forEach loop to complete before continuing.
The function glitchLib below should pull an array of img sources from state, iterate through the elements…
I had previously posted this problem under the error message of “Cannot read property 'data' of undefined”. But in the process of digging into it for several hours, I’ve discovered that my problem really boils down to the fact that my “async /…
My app has a button which fetches JSON api results, and updates that in a TEXT field. Works fine.
import React, { Component } from 'react';
import { View, Text, StyleSheet, Button } from 'react-native';
export default class HomeScreen extends…
I am trying to wrap a react component that requires the google maps api, with a makeAsyncScriptLoader from react-async-script.
In the same file (if that makes a difference):
class SearchBar extends Component {
/* Some stuff requiring the maps…
This's my first react and redux project. I'm try to learning by doing from main redux repo's examples and i can't find an example for todomvc async in that repo.
Finally i've found an excellence tutorial about redux todomvc async and i'v added this…
The app uses node.js and react.js (namely react-async ). So there is a react component that has a click handler inside which I want to get the class names(namely minus_decrement and inline_block) of that component. I used jQuery inside node.js…