View flatten.js
This file contains 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
/** | |
* Flatten any combination of nested ints/arrays | |
* in an array recursively into a flat array | |
* @param input {Array} | |
* @returns {Array} | |
*/ | |
function flatten(input) { | |
let output = []; | |
for(let i = 0; i < input.length; i++) { |
View outerHOCExample.jsx
This file contains 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
outerJSSHOC(injectSheet(styleSheet)(({ classes, baseClasses })=> | |
( // baseClasses was injected by outerJSSHoc | |
<div className={classes.container}> | |
<div className={baseClasses.nonInterferingClass}>another style</div> | |
</div> | |
)) |