Skip to content

Instantly share code, notes, and snippets.

View rajatk16's full-sized avatar
🏠
Working from home

geekrajat rajatk16

🏠
Working from home
View GitHub Profile
(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) {
import react from 'react';
/* Other imports */
/* Code */
export default class App extends React.Component {
render() {
const {userIsLoaded, user} = this.props;
if (!userIsLoaded) return <Loader />;
static propTypes = {
userIsLoaded: PropTypes.boolean.isRequired,
user: PropTypes.shape({
_id: PropTypes.string,
)}.isRequired,
}
export default class Profile extends PureComponent {
static propTypes = {
userIsLoaded: PropTypes.bool,
user: PropTypes.shape({
_id: PropTypes.string,
}).isRequired,
}
static defaultProps = {
userIsLoaded: false,
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>
<div className="one-col">
{isRole('affiliate', user._id) &&
<MyAffiliateInfo userId={user._id} />
}
</div>
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>
(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 =>
{
"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"
},
{
@rajatk16
rajatk16 / data.js
Last active September 4, 2018 22:59
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'},