effect | explanation |
---|---|
put | dispatch an action to the redux store |
select | retrieve a part of the existing application state using selectors |
call | can call other sagas,Promises etc |
take | wait for an action to be dispatched |
fork | trigger a sub-process and move on without waiting for it to complete |
cancel | cancel the sub-process that has been forked |
cancelled | check if a current process has been cancelled |
delay | idles for the given period before moving to next statement, returns a Promise |
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
// Mine | |
@larger-than-mobile: ~"min-width: 400px"; | |
@larger-than-phablet: ~"min-width: 550px"; | |
@larger-than-tablet: ~"min-width: 768px"; | |
@larger-than-desktop: ~"min-width: 1000px"; | |
@larger-than-desktophd: ~"min-width: 1200px"; | |
// Breakpoints | |
@highdensity: ~"only screen and (-webkit-min-device-pixel-ratio: 1.5)", |
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
;(function () { | |
/* ___ __ _ _ _ ____ ______ __ | |
/ | _____/ /_(_) __(_)____(_)___ ____ / __ \________ __________ / ____/__ ____ / /____ _____ | |
/ /| |/ ___/ __/ / | / / / ___/ / __ \/ __ \ / /_/ / ___/ _ \/ ___/ ___/ / / / _ \/ __ \/ __/ _ \/ ___/ | |
/ ___ / /__/ /_/ /| |/ / (__ ) / /_/ / / / / / ____/ / / __(__ |__ ) / /___/ __/ / / / /_/ __/ / | |
/_/ |_\___/\__/_/ |___/_/____/_/\____/_/ /_/ /_/ /_/ \___/____/____/ \____/\___/_/ /_/\__/\___/_/ vanilla 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
;(function (root, factory) { | |
if (typeof define === 'function' && define.amd) { | |
define(factory); | |
} else if (typeof exports === 'object') { | |
module.exports = factory(); | |
} else { | |
root.JUSTYNCLARK = factory(); | |
} |
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
.aspect-ratio($width, $height) { | |
position: relative; | |
&:before { | |
display: block; | |
content: ''; | |
width: 100%; | |
height: 0; | |
padding-top: ($height / $width) * 100%; | |
} | |
} |
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
function constructor(spec) { | |
let | |
{member} = spec, | |
{other} = other_constructor(spec), | |
method = function () { | |
// member, other, method, spec | |
}; | |
return Object.freeze({ | |
method, | |
other |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>JS SCSS Starter</title> | |
<link rel="stylesheet" href="dist/style.css"> | |
</head> | |
<body> | |
<script src="dist/scripts.js"></script> | |
</body> |
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
{ | |
"name": "js-starter", | |
"version": "1.0.0", | |
"description": "A quick JS starter project", | |
"main": "src/js/app.js", | |
"author": "Justyn Clark", | |
"license": "MIT", | |
"devDependencies": { | |
"babel-cli": "^6.24.1", | |
"babel-preset-env": "^1.6.0", |
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
// Example One | |
(function(){ | |
var request; | |
if (window.XMLHttpRequest) { | |
request = new XMLHttpRequest(); | |
} else { | |
request = new ActiveXObject("Microsoft.XMLHTTP"); | |
} | |
request.onreadystatechange = function() { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<button id="btn">Make a promise!</button> | |
<div id="log"></div> | |
<script src="scripts.js"></script> |