Thursday, December 21, 2017

Test redux actions that calls an API

export function receivingItems() { return (dispatch, getState) => { axios.get('/api/items') .then(function(response) { dispatch(receivedItems(; }); }; } describe('Items Action Creator', () => { it('should create a receiving items function', () => { expect(receivingItems())

No comments:

How can you work with a JSON value if you know nothing about it?

I have talked about the difficulty of typing certain JSON values coming from some APIs. The JSON is just very complicated. When I do that,...