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 to build a Hugo website in AWS Lambda and deploy it to S3

This tutorial explains how to run Hugo in AWS Lambda and deploy a static website to Amazon S3. Running Hugo in AWS Lambda can be useful if...