You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the following the dynamic export (store/selectors.js) will first export the accounts and thus the import needed for getClient in accounts gets an ùndefined.
Any idea on how to solve this?
The text was updated successfully, but these errors were encountered:
diegohaz
changed the title
[Redux] - How to handle chained selectors with the dynamic export?
[redux] How to handle chained selectors with the dynamic export?
Jun 11, 2017
I'm wondering how you are correctly importing / exporting chained selectors. For example if you have ´client´ with multiple
accounts
.(simplified example)
clients/selectors.js
export const getClient = (state) => state.client;
accounts/selectors.js (using reselect or anything else)
export const getAccounts = createSelector(getClient, (client) => client.accounts)
Using the following the dynamic export (
store/selectors.js
) will first export theaccounts
and thus the import needed forgetClient
inaccounts
gets anùndefined
.Any idea on how to solve this?
The text was updated successfully, but these errors were encountered: