Typical usage
See original GitHub issueI am still unclear how redux-api should be used from the docs:
If I have a rest object like this
export default reduxApi({
getCountries: {
url: `/countries`,
transformer(data) {
const d = fromJS(data);
return d;
}
}
}).use('options', (url, params, getState) => {
const headers = {
Accept: 'application/json',
'Content-Type': 'application/json'
};
return { headers };
});
What happens with the result? How do I get the data into the global sate. I can see some sort of name spaced action is raised:
@@redux-api@getCountries_success
Should I have case in a switch statement to test for this.
I’m confused what happens after the asyn call returns
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Typical Definition & Meaning - Merriam-Webster
The meaning of TYPICAL is combining or exhibiting the essential characteristics of a group. How to use typical in a sentence.
Read more >Typical usage Definition | Law Insider
Typical usage is up to seven units per day; direct service time associated with providing transportation to/from the program is included in the...
Read more >typical adjective - Oxford Learner's Dictionaries
1having the usual qualities or features of a particular type of person, thing, or group synonym representative a typical Italian café This is...
Read more >Usage of the word "typical" - meaning - English Stack Exchange
One can say "Bob typically buys all the beer!", and that doesn't sound negative at all! · "Well, that's typical" (and a few...
Read more >Typical usage scenarios - IBM
Typical usage scenarios. The following scenarios describe some usage scenarios using the Tivoli® Enterprise Portal and ITCAM for SOA to monitor and diagnose ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I will try to help as well:
The truth is that redux api push the data directly to the state of your redux application by using the path defined in the object passed to
reduxApi()
function.Which means that the data will store in the variable call
getCountries
as object that will contain the information above mention.In order to use in your component you will need to use
mapStateToProps
fromconnect
something likeActually the problem was my reducer, changing it to this fixed my problem:
Calling
combineReducers
on thereduxApi.reducers
was the missing bit for me.