React/Redux : To make Function Complete update Cache Task before returning Data from Cache The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceWhy do we need middleware for async flow in Redux?How do I access data returned from an axios get to display on a web page using react js?PUT request won't updated data | React, ReduxRedux : New value returned from reducer not updating in StateAPI fetches incomplete data from the server in React JS projectUpdate vue data properties in setTimeout functionBest practice with react redux refreshing data with updated date rangeUnable to access JSON object by property in firebase via axios.getUsing axios to fetch data from an API which has an API attribute in it in reactReact + Axios - Map returns is not a function?
Huge performance difference of the command find with and without using %M option to show permissions
How do you keep chess fun when your opponent constantly beats you?
How to politely respond to generic emails requesting a PhD/job in my lab? Without wasting too much time
Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?
How did the audience guess the pentatonic scale in Bobby McFerrin's presentation?
How do spell lists change if the party levels up without taking a long rest?
Do working physicists consider Newtonian mechanics to be "falsified"?
University's motivation for having tenure-track positions
Loose spokes after only a few rides
If I score a critical hit on an 18 or higher, what are my chances of getting a critical hit if I roll 3d20?
Am I ethically obligated to go into work on an off day if the reason is sudden?
Accepted by European university, rejected by all American ones I applied to? Possible reasons?
What was the last x86 CPU that did not have the x87 floating-point unit built in?
US Healthcare consultation for visitors
How do I design a circuit to convert a 100 mV and 50 Hz sine wave to a square wave?
Is an up-to-date browser secure on an out-of-date OS?
One-dimensional Japanese puzzle
What's the point in a preamp?
How to type a long/em dash `—`
What is the role of 'For' here?
Is 'stolen' appropriate word?
Example of compact Riemannian manifold with only one geodesic.
Variable with quotation marks "$()"
Why don't hard Brexiteers insist on a hard border to prevent illegal immigration after Brexit?
React/Redux : To make Function Complete update Cache Task before returning Data from Cache
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
The Ask Question Wizard is Live!
Data science time! April 2019 and salary with experienceWhy do we need middleware for async flow in Redux?How do I access data returned from an axios get to display on a web page using react js?PUT request won't updated data | React, ReduxRedux : New value returned from reducer not updating in StateAPI fetches incomplete data from the server in React JS projectUpdate vue data properties in setTimeout functionBest practice with react redux refreshing data with updated date rangeUnable to access JSON object by property in firebase via axios.getUsing axios to fetch data from an API which has an API attribute in it in reactReact + Axios - Map returns is not a function?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
Dynamic Dashboard in React: It has datePicker which allows user to change date and displays data in TreeMap and statistics in Grid Table. Lot of complexities are involved in between but this is the high level goal of the dashboard.
Problem:
When Date is changed from DatePicker, appropriate action function is called which calls API class that has axios.get() call to get data from API. That in turn calls other class which pass parameters and cache to another function to get the data. Inside that function which gets all the data Update() method is called which calls the actual URL with parameters and stores the response in jsons into array.
Issue:
Inside the getData() and UpdateData() function the part which gets the data from cache is called first before completing the update of data for new date.
Ideal Flow:
getData - Calls updateData
updateData - Has code to update Cache and get data from Cache.
updated Cache - should be called first.
GetData from Cache - should be called after that.
Solution:
1. I have tried setTimeout() but it increases response time to load page
2. Used await with async but it does not help.
Using:
Axios() from 'axios'
getSecure() from 'httpClient'
Basically i want to make update function complete and then call getData part from Cache.
Let me know if you need more details.
reactjs redux axios wait synchronous
add a comment |
Dynamic Dashboard in React: It has datePicker which allows user to change date and displays data in TreeMap and statistics in Grid Table. Lot of complexities are involved in between but this is the high level goal of the dashboard.
Problem:
When Date is changed from DatePicker, appropriate action function is called which calls API class that has axios.get() call to get data from API. That in turn calls other class which pass parameters and cache to another function to get the data. Inside that function which gets all the data Update() method is called which calls the actual URL with parameters and stores the response in jsons into array.
Issue:
Inside the getData() and UpdateData() function the part which gets the data from cache is called first before completing the update of data for new date.
Ideal Flow:
getData - Calls updateData
updateData - Has code to update Cache and get data from Cache.
updated Cache - should be called first.
GetData from Cache - should be called after that.
Solution:
1. I have tried setTimeout() but it increases response time to load page
2. Used await with async but it does not help.
Using:
Axios() from 'axios'
getSecure() from 'httpClient'
Basically i want to make update function complete and then call getData part from Cache.
Let me know if you need more details.
reactjs redux axios wait synchronous
Basically, I want to make update Task thing complete fully before get Data thing is called.
– Manisha Mulchandani
Mar 12 at 13:02
add a comment |
Dynamic Dashboard in React: It has datePicker which allows user to change date and displays data in TreeMap and statistics in Grid Table. Lot of complexities are involved in between but this is the high level goal of the dashboard.
Problem:
When Date is changed from DatePicker, appropriate action function is called which calls API class that has axios.get() call to get data from API. That in turn calls other class which pass parameters and cache to another function to get the data. Inside that function which gets all the data Update() method is called which calls the actual URL with parameters and stores the response in jsons into array.
Issue:
Inside the getData() and UpdateData() function the part which gets the data from cache is called first before completing the update of data for new date.
Ideal Flow:
getData - Calls updateData
updateData - Has code to update Cache and get data from Cache.
updated Cache - should be called first.
GetData from Cache - should be called after that.
Solution:
1. I have tried setTimeout() but it increases response time to load page
2. Used await with async but it does not help.
Using:
Axios() from 'axios'
getSecure() from 'httpClient'
Basically i want to make update function complete and then call getData part from Cache.
Let me know if you need more details.
reactjs redux axios wait synchronous
Dynamic Dashboard in React: It has datePicker which allows user to change date and displays data in TreeMap and statistics in Grid Table. Lot of complexities are involved in between but this is the high level goal of the dashboard.
Problem:
When Date is changed from DatePicker, appropriate action function is called which calls API class that has axios.get() call to get data from API. That in turn calls other class which pass parameters and cache to another function to get the data. Inside that function which gets all the data Update() method is called which calls the actual URL with parameters and stores the response in jsons into array.
Issue:
Inside the getData() and UpdateData() function the part which gets the data from cache is called first before completing the update of data for new date.
Ideal Flow:
getData - Calls updateData
updateData - Has code to update Cache and get data from Cache.
updated Cache - should be called first.
GetData from Cache - should be called after that.
Solution:
1. I have tried setTimeout() but it increases response time to load page
2. Used await with async but it does not help.
Using:
Axios() from 'axios'
getSecure() from 'httpClient'
Basically i want to make update function complete and then call getData part from Cache.
Let me know if you need more details.
reactjs redux axios wait synchronous
reactjs redux axios wait synchronous
edited Mar 8 at 12:08
Manisha Mulchandani
asked Mar 8 at 11:12
Manisha MulchandaniManisha Mulchandani
64
64
Basically, I want to make update Task thing complete fully before get Data thing is called.
– Manisha Mulchandani
Mar 12 at 13:02
add a comment |
Basically, I want to make update Task thing complete fully before get Data thing is called.
– Manisha Mulchandani
Mar 12 at 13:02
Basically, I want to make update Task thing complete fully before get Data thing is called.
– Manisha Mulchandani
Mar 12 at 13:02
Basically, I want to make update Task thing complete fully before get Data thing is called.
– Manisha Mulchandani
Mar 12 at 13:02
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55062015%2freact-redux-to-make-function-complete-update-cache-task-before-returning-data%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55062015%2freact-redux-to-make-function-complete-update-cache-task-before-returning-data%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Basically, I want to make update Task thing complete fully before get Data thing is called.
– Manisha Mulchandani
Mar 12 at 13:02