Questions tagged [react-async]

Related to sync feature of React.js

Related to sync feature of React.js: https://reactjs.org/

https://reactjs.org/docs/getting-started.html

27 questions
12
votes
3 answers

React-Select Async loadOptions is not loading options properly

React Async Select loadoption sometimes fail to loads the option. This is a very strange phenomenon after couple of set of queries react loadoptions don't load any value but i can see from log that results properly came from backend query. My…
Shakil
  • 3,607
  • 2
  • 21
  • 32
9
votes
1 answer

Render a component from outside ReactJS

From here : "The only way to get a handle to a React Component instance outside of React is by storing the return value of React.render." I need to render a React component outside React and the reason for it I'm going to mention below. In my…
Istiaque Ahmed
  • 4,977
  • 17
  • 59
  • 117
4
votes
1 answer

Dynamic Lazy Loading using React.Lazy (16.6.0)

I get an array like {Path:xxx, Component:"./xxx/ComPXX"} from my API and based on that create my application's routes. At the moment I'm using React-Loadable (5.5.0) and React-Router (4.4.0-betax to avoid warnings in strict mode). See working…
Asha
  • 3,001
  • 7
  • 40
  • 56
4
votes
2 answers

React Redux - this.props.actions.fetchPosts is not a function

i have issue with calling async action from my component, i think i did everything what was needed to work but seems like not, i used: mapDispatchToProps and inside i return actions: bindActionCreators(fetchPosts, dispatch) and i connect…
Trusislv1
  • 173
  • 1
  • 3
  • 10
3
votes
1 answer

How to append data to a component with useAsync hook?

I am using react-async to fetch data from api like this: import {useAsync} from 'react-async' const getOrders = () => ... const MyComponent = () => { const { data, error, isLoading } = useAsync({ promiseFn: getOrders }) if (isLoading) return…
Neevai
  • 58
  • 7
3
votes
2 answers

Rendering part of the functional component after async call gets completed

I'm using material-ui with a react functional component and using its Autocomplete component. I customized it and whenever I change the text in input field, I expect the component to render new search result. callAPI("xyz") I'm calling the API in…
3
votes
2 answers

react.js change state of the topmost parent element from a deeply nested child

I am using react-async along with node.js. React-async is used to use react.js in the asynchronous way. To make ajax calls, I am using super-agent. The PostList Component is the topmost parent component. Through its setTopmostParentState method, the…
Istiaque Ahmed
  • 4,977
  • 17
  • 59
  • 117
2
votes
2 answers

Async throws error in React Functional Component

I am trying to use use async in following functional component but throws error const RouteConfig = async ({ component: Component, fullLayout, user, auth, ...rest}) => ( { return ( …
2
votes
1 answer

Maximum call stack size exceeded in react native

I am using react native and everything was working fine until I introduced following libs in package.json "babel-plugin-transform-class-properties": "^6.24.1", "babel-preset-es2015": "^6.24.1", "babel-preset-react": "^6.24.1", …
Adnan Ali
  • 2,194
  • 4
  • 24
  • 45
2
votes
1 answer

Getting rid of localhost:3000 URLs for ReactAsync

Cross-posted to https://github.com/andreypopp/react-async/issues/34 When using react-async is is common to have code which looks like: var UserPage = React.createClass({ mixins: [ReactAsync.Mixin], statics: { getUserInfo: function(username,…
fadedbee
  • 37,386
  • 39
  • 142
  • 236
1
vote
0 answers

React - Force Reload Of Component

In my component - I am calling out to a service class that performs an async call. I pass a callback to the service and use that when the async call is complete. Is it possible to force a reload of the component from this callback…
Damien Gallagher
  • 355
  • 1
  • 4
  • 14
1
vote
0 answers

revise jquery ajax into native react methos

how can I remove the jquery-ui ajax in react for some other ajax method. I am fetching data from json file and need to show the data in the html page. var app = React.createClass({ loadAppData: function() { $.ajax({ async: false, …
0
votes
0 answers

How can I use a Promise and await/async?

I'm writing a ReactJS app which connects to Firebase via a Springboot back end, and I'm stuck on returning a value from a function. I don't fully understand Promises and await/async (are they even meant to be used together or has one replaced the…
Sharon
  • 2,841
  • 8
  • 42
  • 69
0
votes
1 answer

Caught Error error while using useEffect react native HOOks

so i am trying to use async storage and trying to validate if their is data in Async or not.. here is my code here is the error i am not able to validate through...
0
votes
2 answers

Is there a way to await changes in state? (not setState)

I want to await for changes in shared state and act on those, so: function Foo() { const [bar, setBar] = useContext(myContext) const someHandler = async () => { doSomething() while(true) { await stateDidChange(bar) …
Rollie
  • 3,781
  • 2
  • 23
  • 42
1
2