How to use meta key?
erickreutz opened this issue · 1 comments
erickreutz commented
In the docs for meta
it says:
Various metadata for the query. Can be used to update other reducers when queries succeed or fail.
How does one actually accomplish that? I can't find much in the docs or the code about using meta.
ryanashcraft commented
@erickreutz meta
just lets you attach any arbitrary data to the query and all redux start/end actions for that query will include the meta. Then in your reducers you can test for actions relevant to those queries like action.type === ActionTypes.REQUEST_SUCCESS && action.meta && action.meta.foo == 'bar'
.
Hopefully that helps! Let me know if you need a more complete example.