This document details some tips and tricks for creating redux containers. Specifically, this document is looking at the mapDispatchToProps argument of the connect function from [react-redux][react-redux]. There are many ways to write the same thing in redux. This gist covers the various forms that mapDispatchToProps can take.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0x00 0 STOP | |
| 0x01 3 ADD | |
| 0x02 5 MUL | |
| 0x03 3 SUB | |
| 0x04 5 DIV | |
| 0x05 5 SDIV | |
| 0x06 5 MOD | |
| 0x07 5 SMOD | |
| 0x08 8 ADDMOD | |
| 0x09 8 MULMOD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sinonStubPromise from 'sinon-stub-promise'; | |
| import sinon from 'sinon' | |
| sinonStubPromise(sinon) | |
| let stubedFetch = sinon.stub(window, 'fetch') ) | |
| window.fetch.returns(Promise.resolve(mockApiResponse())); | |
| function mockApiResponse(body = {}) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #trap 'kill $(jobs -p)' EXIT | |
| # Batch parameters | |
| N_PROC=4 | |
| Z_ROT=0 | |
| N_EV_MIL=80 | |
| JOB_NAME=dummyTest | |
| FILL_WIDTH=44 | |
| FILL_THICKNESS=11.5 |