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 (e) { | |
const n = console.log; | |
const o = document.querySelector (e.selector); | |
const t = e.globalName || 'logger'; | |
i (o, { | |
background: e.colors.background, | |
color: e.colors.foreground, | |
fontFamily: 'monospace', | |
}); | |
function r (e) { |
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
import react from 'react'; | |
/* Other imports */ | |
/* Code */ | |
export default class App extends React.Component { | |
render() { | |
const {userIsLoaded, user} = this.props; | |
if (!userIsLoaded) return <Loader />; | |
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
static propTypes = { | |
userIsLoaded: PropTypes.boolean.isRequired, | |
user: PropTypes.shape({ | |
_id: PropTypes.string, | |
)}.isRequired, | |
} |
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
export default class Profile extends PureComponent { | |
static propTypes = { | |
userIsLoaded: PropTypes.bool, | |
user: PropTypes.shape({ | |
_id: PropTypes.string, | |
}).isRequired, | |
} | |
static defaultProps = { | |
userIsLoaded: 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
const Billboard = () => ( | |
<ZoneBlack> | |
<Heading>React</Heading> | |
<div className="billboard_product"> | |
<Link className="billboard_product-image" to="/"> | |
<img alt="#" src="#"> | |
</Link> | |
<div className="billboard_product-details"> | |
<h3 className="sub">React</h3> | |
<p>Lorem Ipsum</p> |
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
<div className="one-col"> | |
{isRole('affiliate', user._id) && | |
<MyAffiliateInfo userId={user._id} /> | |
} | |
</div> |
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
import React, {Component} from 'react'; | |
import './style.css'; | |
export default class Header extends Component { | |
render() { | |
return ( | |
<div id="header"> | |
<h1>StyleSheet.get()</h1> | |
<h2>Paste your code and get the StyleSheet</h2> | |
</div> |
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) { | |
const { get, modify } = crocks.State | |
const { constant } = crocks | |
const add = | |
x => y => x + y | |
const inc = | |
add(1) | |
const multiply = | |
x => y => x * y | |
const addState = n => |
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
{ | |
"rebirth": [ | |
{ | |
"id": "1", | |
"name": "DC Comics Rebirth", | |
"description": "It all begins here. Do not skip to the last page. Do not let a friend or message board ruin this comic for you. The future (and past) of the DC Universe starts here. Don’t say we didn’t warn you!", | |
"image": "https://www.dccomics.com/sites/default/files/styles/covers192x291/public/comic-covers/2016/05/DCUREB_Cv1_ds_300dpi_cropped_5743b270aaaae3.39723701.jpg?itok=JpNJJ2_O", | |
"price": "$2.99" | |
}, | |
{ |
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
const data = { | |
heroes: { | |
'hero-1': {id: 'hero-1', name: 'Iron Man'}, | |
'hero-2': {id: 'hero-2', name: 'Thor'}, | |
'hero-3': {id: 'hero-3', name: 'Hulk'}, | |
'hero-4': {id: 'hero-4', name: 'Captain America'}, | |
'hero-5': {id: 'hero-5', name: 'Black Widow'}, | |
'hero-6': {id: 'hero-6', name: 'Dr. Strange'}, | |
'hero-7': {id: 'hero-7', name: 'War Machine'}, | |
'hero-8': {id: 'hero-8', name: 'Spider Man'}, |