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
// Testable Custom Hooks | |
import { useEffect } from "react"; | |
// Function that can be tested with clear API, easily unit-testable | |
const handleHasLoader = ({ isLoading, hasFocus, setHasLoader }) => { | |
if (isLoading && !hasFocus) { | |
return setHasLoader(true); | |
} | |
return setHasLoader(false); |
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
// This is an exisiting React Component written as a Function Component using JavaScript. | |
import React from "react"; | |
import { string, any } from "prop-types"; | |
const Card = ({ | |
headline, | |
createdAt, | |
children, | |
}) => { |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es5", | |
"lib": [ | |
"dom", | |
"dom.iterable", | |
"esnext" | |
], | |
"allowJs": true, | |
"noImplicitAny": false, |
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
on run {input, parameters} | |
set inputVolume to input volume of (get volume settings) | |
if inputVolume = 0 then | |
set inputVolume to 35 | |
set displayNotification to "Microphone Unmuted" | |
else | |
set inputVolume to 0 | |
set displayNotification to "Microphone Muted" | |
end if |
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
module.exports = { | |
config: { | |
// default font size in pixels for all tabs | |
fontSize: 12, | |
// font family with optional fallbacks | |
fontFamily: 'Consolas, Menlo, "DejaVu Sans Mono", "Lucida Console", monospace', | |
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk) | |
cursorColor: 'rgba(248,28,229,0.8)', |
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
/** | |
* Module | |
*/ | |
// External Library | |
import _ from '../node_modules/lodash/dist/lodash.js'; | |
// Private variables | |
let _eventName = '_test'; |
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
Donations for beer | |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
div { | |
border-radius: 50%; | |
height: 200px; | |
background: #ddd; | |
width: 200px; | |
} |
NewerOlder