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(response.data)); }); }; } describe('Items Action Creator', () => { it('should create a receiving items function', () => { expect(receivingItems()).to.be.a.

No comments:

Moving Backgrounds With Mouse Position

Let's say you wanted to move the background-position on an element as you mouse over it to give the design a little pizzazz. You have ...